Parse terragrunt.hcl and inherit terraform_version_constraint from parent #259
Labels
enhancement
Refactor existing code for better performance and quality
help wanted
Extra attention is needed
Is your feature request related to a problem? Please describe.
We're using terragrunt with a nested moule structure, meaning:
We have
terragrunt.hcl
in bothstages/{stage}
, to define global parameters, and instages/{stage}/{module}
, where we define the specific module variable.We locked the
terraform_version_constraint
insidestages/{stage}
. Runningtfswitch
from module does not work, we are prompted for a version, so we run it from the module folder.From time to time we override the terraform_constraint in one specific module. In this scenario, we need to run
tfswitch
inside the module folder.This is bad DX and causes issues with CI systems, since we do not have a predictable path to run
tfswitch
in.Describe the solution you'd like
It would be helpful to be able to parse the hcl file, so that we would inherit the parent declarations, and behave accordingly.
Each of our modules has an include:
so, by parsing HCL, the terraform_constraint_version may be inherited from the parent.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: