-
-
Notifications
You must be signed in to change notification settings - Fork 956
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 should enforce best practices around version control #75
Comments
This proposal wouldn't solve the 2nd problem described above:
What about introducing an additional wrapper step if the actual Terraform command is |
This would be handled by step 3:
I suppose that step could also do the |
Whoops, my attention to detail had a fail moment there :-) |
Heh, no worries. Do you think this approach would solve the issues with out of date |
I guess there's still some issues:
Not sure a simple command line tool would ever be able to close every gap, though. |
True. I updated the description to make that more clear.
True, but I'd argue those changes should still be in Git in that case, as they likely partially applied, and that code is still the best representation of your infrastructure that you have.
If
No, but it seems like we can get 95% of what we need here. |
What if I don't use |
@tamsky Support for other version control systems could be added too. That's why there is a |
Just sayin, |
We are unlikely to implement this, as we've seen that people use Terragrunt and their VCS in a variety of ways. Closing. |
Terragrunt provides locking for state files, but you can still have "concurrency" issues with the following two scenarios:
git pull
before runningterragrunt apply
, so you end up applying out-of-date templates.git commit
andgit push
after runningterragrunt apply
, so even if your other teammates remember to rungit pull
, they will end up applying out-of-date templates.Perhaps we should add a new setting in
.terragrunt
:If you have that config in your file, then every time you run
terragrunt apply
, Terragrunt will:master
and if not, exit with an error.master
, and if you do, exit with an error.git pull origin master
.Note that you'd probably only want this config in "shared" environments such as production. For test environments, you will likely make many changes with Terraform that are not committed to version control, as a way to test those changes before committing.
The text was updated successfully, but these errors were encountered: