-
-
Notifications
You must be signed in to change notification settings - Fork 986
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
How Terragrunt Will Handle Terraform 0.9.0 Compatibility #158
Comments
Hi guys! I have few comments on these (in reversed order). First, handling retries when a lock cannot be obtained: User Migration Strategy: Handling Remote State in Terraform 0.9: |
@antonbabenko Thanks for the feedback! Good to know we're on the right track :) |
Hi @josh-padnick & Jim, here's my interim hack that allows me to use terraform 0.9.x with terragrunt 0.11.0: With it, I'm able to continue to use my existing remote state declarations.
https://gist.github.com/tamsky/8a685a971170031042d421afb276fc50 TL;DR: a script intercepts terragrunt's calls to |
@tamsky Ah, I didn't realize the |
After playing around with Terraform 0.9 and its backends, I wanted to document some missing features that Terragrunt currently has so we can explicitly decide how to address these:
|
@tamsky thanks for your workaround - could you tell how do you configure terraform's remote state in the .tf file and in terraform.tfvars file? I had to remove backend config from terragrunt and move it into terraforms main.tf, and only use terragrunt for locking. |
👍 to being able to use interpolation with remote state configuration. The lack of interpolation was a rude shock this afternoon. Defining different state backends via terragrunt, stored in different .tfvars files, was a feature I relied on. I wouldn't care as much if S3 didn't have a single global namespace and needed to keep state bucket names different across accounts which is how we separate environments. |
Terraform 0.9.3 was just cut with some features we've been eagerly awaiting. Terragrunt is too great to give up right now though. I noticed #160, but it seems like the discussion has kind of stalled over there. How are we looking on the 0.9.x remote state magic? |
Hi Terragrunt users. :) I want to first say that we're sorry we broke Terragrunt functionality. We really like Terragrunt and didn't purposely seek in any way to break it. The motivations for removing In hindsight, we probably should've deprecated it because the functionality still exists and is exactly replicated with We've made some improvements since this issue was first posted (and probably more in the future so only take this as a point-in-time snapshot for 0.9.3):
If there are things we can do to help you we'll do them to the extent they make sense for the project (such as the above). One area that is difficult for us is variable interpolation in backend configurations. Its something people want, and its something that is technically not impossible, but its not super simple either. I'm sure we'll support it but it may not be very soon. We're recommending people parameterize using From what I've heard there are a handful of features that we don't support that Terragrunt supported. We'd be more interested in the short term of helping get Terragrunt working rather than try to replace those features. Let us know how we can help. |
@mitchellh Thanks for the info! We're obviously huge fans of Terraform and have been using Terragrunt as a way to quickly try out relatively major extra functionality. Would be interesting to brainstorm how that can be done in a way that is more compatible with future versions of Terraform.
Nice!
Excellent. Our current thinking is to piggyback on the
The major things we'd like to do in the near term are:
|
Update: I finally made time to put together a PR that adds compatibility for Terraform 0.9! You can find it here: #167. Feedback is very welcome. Thank you everyone for your patience. |
Hello Terragrunt Community,
As of today, Terragrunt is not compatible with Terraform 0.9.x. We want to fix that. This GitHub Issue will outline our current thinking on how we plan to do that.
Handling Remote State in Terraform 0.9: Unfortunately, Terraform 0.9.x removed the
terraform remote config
commands, which is why Terragrunt is not usable with Terraform 0.9.x. To resolve this, we’ve been exploring the best way to configure remote state in Terraform 0.9.x.Ideally, Terragrunt could simply retire this feature altogether, as Terraform 0.9 allows you to define your remote state configuration in your .tf files. Unfortunately, Terraform does not support all the features Terragrunt had, such as
path_relative_to_include()
, manual lock controls, and automatic retry when a lock cannot be obtained.Our current thinking is to move to Terraform’s remote state configuration, but with variables where you’d like to use Terragrunt features:
You can then configure Terragrunt to pass in the variables, using the interpolation helpers as before:
User Migration Strategy: Many of our users (and Gruntwork clients) have multiple folders configured to use Terragrunt. We plan to explicitly think through a recommended migration strategy. This could be a simple recommendation to manually make updates, or some kind of automation. We’re still thinking through this.
Handling Retries When a Lock Cannot be Obtained: When Terragrunt cannot obtain a lock, it keeps trying to get one until it times out. Currently, Terraform 0.9.x fails immediately if a lock cannot be obtained. Some CI scripts may depend on having an automatic retry, so we intend to wrap the native Terraform backends code with our own lock-retry mechanism.
Timeline
In an ideal world, we’d begin these changes right away, but we are currently at capacity with other work. We will start making fixes to Terragrunt as soon as we can, but that may not be for another week or two. If anyone wishes to submit a PR, we would be grateful!
Feedback
Feedback is always welcome. Please feel free to leave additional comments in this thread. Thanks for using Terragrunt, and for your patience while we add support for Terraform 0.9.x!
The text was updated successfully, but these errors were encountered: