We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the solution you'd like Having a older structure like this:
├── dev │ ├── stage.hcl │ └── app1 │ └── bucket │ └── terragrunt.hcl ├── qual │ ├── stage.hcl │ └── app1 │ └── bucket │ └── terragrunt.hcl ├── global.hcl └── terragrunt.hcl
I end up having this redundant code in every single terragrunt.hcl file:
locals { stage_vars = read_terragrunt_config(find_in_parent_folders("stage.hcl")) resource_group_name = local.stage_vars.locals.resource_group_name stage_name = local.stage_vars.locals.stage_name }
I would like to define said code once in the root terragrunt.hcl file
Describe alternatives you've considered The docs regarding globally-defined-locals also is more or less the same and doesn't help.
Additional context Is there already WIP where I could maybe participate? Or did I miss a specific feature solving my use-case?
The text was updated successfully, but these errors were encountered:
Hi, can be used include with merge_strategy = "deep"
merge_strategy = "deep"
# dev/app1/terragrunt.hcl include "root" { path = find_in_parent_folders() merge_strategy = "deep" } # parent terragrunt.hcl locals { stage_vars = read_terragrunt_config(find_in_parent_folders("stage.hcl")) resource_group_name = local.stage_vars.locals.resource_group_name stage_name = local.stage_vars.locals.stage_name }
Simplified example in: https://github.com/denis256/terragrunt-tests/tree/master/reuse-locals
Sorry, something went wrong.
perfect, thanks so much. I created a documentation PR for this: #3070
denis256
No branches or pull requests
Describe the solution you'd like
Having a older structure like this:
I end up having this redundant code in every single terragrunt.hcl file:
I would like to define said code once in the root terragrunt.hcl file
Describe alternatives you've considered
The docs regarding globally-defined-locals also is more or less the same and doesn't help.
Additional context
Is there already WIP where I could maybe participate?
Or did I miss a specific feature solving my use-case?
The text was updated successfully, but these errors were encountered: