Will there be continuing support/releases for the 0.18.x version, since there are breaking changes on both the terragrunt and terraform (with .12) sides?
relevant to maintaining a Homebrew version of the tool:
https://github.com/Homebrew/homebrew-core/pull/40926
No, probably not. We may do some sort of hotfix for security issues, but other than that, there will be no additional support for Terraform 0.11.x. We're doing our best to keep up with the work for one version of Terraform, and unfortunately, I just don't think we'd be able to handle more than that!
But actually, what does really make the new terragrunt incompatible with terraform 0.11?
There are new configuration files terragrunt.hcl, ok, but it has nothing to do with terraform itself.
I installed terraform 0.11 into a separate directory, converted terraform.tfvars into terragrunt.hcl and hacked the PATH:
$PATH=~/bin/terraformv11:$PATH terragrunt plan
It worked!
For some reason --terragrunt-tfpath fails with
terragrunt --terragrunt-tfpath=~/bin/terraformv11/terraform plan
Incorrect Usage. flag provided but not defined: -terragrunt-tfpath
Anyway, can we set the terraform path in terragrunt.hcl instead? It would:
terragrunt.hclterragrunt.hclSo we'll be able to have a mix of modules for 0.11/0.12.
The differences from 0.11 weren't huge:
inputs = { ... } block as environment variables, converting them to JSON first. Not positive this works as expected with Terraform 0.11.>= 0.12.0: we're no longer testing with Terraform 0.11, only Terraform 0.12. So even if it works now, it may well break later, and I'm not a fan of having to develop and test against multiple versions.The unfortunate reality is that Terraform is not a 1.x tool, so there's no promise of backwards compatibility; the same is true of anything that works with Terraform, including Terragrunt.
Yes, I forgot to mention that I removed the version constrain from terragrunt before it worked :)
Well, I'm still keen on making a PR that will allow overriding the terraform binary path in terragrunt.hcl. The change doesn't seem huge to me.
It's just a no-go for the upgrade at the moment, because we can't just upgrade all modules we have to 0.12 at once. @brikis98 How do you think?
Also, is it possible to generate a terragrunt_auto.tfvars with the variables from input instead of converting them to env vars? The file will be automatically included by terraform in that case, and it should work better with complex types https://github.com/gruntwork-io/terragrunt/issues/738
I agree with @ekini. It's not exactly feasible to upgrade all modules at once, especially if there are considerable changes required.
Just to put it out there, one option is to dual boot terragrunt using a method very similar to this post. Note that I agree it is not an ideal situation because you also have to dual boot terraform and so there is a lot of switching involved, but it is at least a workaround (meaning, partial upgrade is not entirely impossible).
That's really a lot of switching :) Another universal workaround for those who use direnv is to download old terragrunt/terraform into separate folders and put the following into .envrc
export PATH=~/bin/terragrunt-0.18:~/bin/terraformv11:$PATH
The main downside is that it will require a lot of files like this in every module that requires a specific version, and any developer will have to install/configure direnv.
Most helpful comment
Yes, I forgot to mention that I removed the version constrain from terragrunt before it worked :)
Well, I'm still keen on making a PR that will allow overriding the terraform binary path in
terragrunt.hcl. The change doesn't seem huge to me.It's just a no-go for the upgrade at the moment, because we can't just upgrade all modules we have to
0.12at once. @brikis98 How do you think?Also, is it possible to generate a
terragrunt_auto.tfvarswith the variables frominputinstead of converting them to env vars? The file will be automatically included by terraform in that case, and it should work better with complex types https://github.com/gruntwork-io/terragrunt/issues/738