You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to have the concept of variable precedence where I can override variables that are defined in e.g. a tfvars files with those "closer" to the module source (i.e. in the same file).
An example:
I have a stack of modules that define a customer environment. In this environment, I'm using a particular SSH key as the root key. If I now want to roll over the key, I now have to remove the keypair from the top level tfvars and define it in each module individually, then change them all one by one, then add it back to the top level file. Implementing the concept of precedence would remove a step and enable some scenarios where you want to have the same variable value almost everywhere.
The text was updated successfully, but these errors were encountered:
Currently, Terragrunt doesn't do anything with the variables you set outside of the terragrunt = { ... } block in your .tfvars files. Requests for this have come up quite a few times (e.g. #132), but it's nontrivial to implement.
Your best bet for now is to take advantage of extra_arguments to pass variables using -var or -var-file flags. Note that these are overridable in children .tfvars files, so it can most likely do what you want.
Hey there,
I would love to have the concept of variable precedence where I can override variables that are defined in e.g. a tfvars files with those "closer" to the module source (i.e. in the same file).
An example:
I have a stack of modules that define a customer environment. In this environment, I'm using a particular SSH key as the root key. If I now want to roll over the key, I now have to remove the keypair from the top level tfvars and define it in each module individually, then change them all one by one, then add it back to the top level file. Implementing the concept of precedence would remove a step and enable some scenarios where you want to have the same variable value almost everywhere.
The text was updated successfully, but these errors were encountered: