Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terragrunt v0.0.1, with DynamoDB locking #2

Merged
merged 31 commits into from
Jun 1, 2016
Merged

Terragrunt v0.0.1, with DynamoDB locking #2

merged 31 commits into from
Jun 1, 2016

Conversation

brikis98
Copy link
Member

This PR contains the initial implementation of terragrunt. v0.0.1 is just a thin wrapper for the Terraform client that provides locking using DynamoDB. It requires minimal setup, it’s in the free tier, and for teams already using AWS, it provides a really easy way to safely collaborate on Terraform state with minimal changes to their Terraform workflow. In fact, the only change is that you run commands using terragrunt XXX instead of terraform XXX.

Note that this PR replaces #1 in this repo (which I’ll close shortly). PR #1 also discussed support for locking using Git (or more specifically, a centralized source of truth for Git, such as GitHub). I began that implementation, and this PR contains commits with that code, but it’s quite a bit messier than the DynamoDB solution. I hit my time cap on the Git hacking and decided to remove it from this initial version. Perhaps, if there is demand for it, we can bring it back in the future.

@@ -0,0 +1,182 @@
#!/bin/bash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I stole this script from the VAAS repo and made a few minor updates to it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Not a priority right now, but it'd be nice if we published this as an open source go-based tool.

echo "Installing dependencies using Glide"
cd "$REPO"
glide install

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice call splitting this out into a separate script.

@josh-padnick
Copy link
Contributor

This looks fantastic. The dynamo code in particular was surprisingly complex and you did a nice job wrapping that in enough functions to make the code readable.

Nice testing, and the locking mechanism is pretty easy to follow.

Most of my comments centered around docs, conventions, and defaults, but overall this looks great. Once you've responded to comments, feel free to merge.

@josh-padnick
Copy link
Contributor

Question: are there any conflicts between terragrunt and terraform sub-commands? For example, what happens if I run terragrunt version? Do I get terragrunt's version or terraform's?

@brikis98
Copy link
Member Author

brikis98 commented Jun 1, 2016

terragrunt version runs Terraform's version command; terragrunt --version runs Terragrunt's version command. A bit confusing, but good enough.

@brikis98
Copy link
Member Author

brikis98 commented Jun 1, 2016

I've made all updates in #4. Merging this one.

@brikis98 brikis98 merged commit db4caf1 into master Jun 1, 2016
@brikis98 brikis98 deleted the v0.0.1-impl branch June 1, 2016 10:08
brikis98 added a commit that referenced this pull request Jul 11, 2018
brikis98 pushed a commit that referenced this pull request Sep 24, 2019
yorinasub17 pushed a commit that referenced this pull request Jan 12, 2021
tests: add regression tests for 1102
@ZachGoldberg ZachGoldberg mentioned this pull request Jul 11, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants