I didn't see this documented but it would be useful to support a terragrunt version constraint in the same way terraform version constraints are supported.
Ensuring a team of people use a consistent version allows for new features to be supported and avoids errors when people on older versions try to run the same code base and the error message may not be immediately obvious is down to incorrect version. It's more user friendly that the user is prompted they are not running a required version.
A second more important case is that functions may change over time with bugfixes either intentionally or as a side effect. Ensuring everyone applying from a repo is using the same terragrunt version would at least ensure consistency.
Agreed! PR welcome.
I'll take this; the question I would have is how should I be discovering the current Terragrunt version?
For Terraform, it's simply running the executable and parsing the input @ https://github.com/gruntwork-io/terragrunt/blob/master/cli/version_check.go#L19
I would think we could be a bit smarter for Terragrunt since it should know already?
You will want to flow the version from here
to TerragruntOptions.
I am in full support (and need) of this feature. we are pinning terraform version in the hcl file but I would like to also pin the TG version as well.
Most helpful comment
I am in full support (and need) of this feature. we are pinning terraform version in the hcl file but I would like to also pin the TG version as well.