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
We really like terragrunt as it helps us keeping our codebase dry.
Although terragrunt could go one step further -
Currently we have a setup where every terragrunt component has more or less the same terragrunt.hcl.
It would be super if there would be way to instruct terragrunt that a particular folder has a specific range of components, that are all using the same terragrunt.hcl without having to layout all those folders and copy the very same terragrunt.hcl everywhere.
Additionally, it should be possible to add hcl on top this baseline folder hcl.
Motivation
Terragrunt is really helpful in keeping our code DRY, but currently we suffer from having the (almost) the same hcl files everywhere.
We would really like to slim down the amount of repeated code as much as possible.
Proposal
Although most probably not the best solution, but it could work:
.terragrunt-template.hcl contains the base hcl config that is executed for every specified component.
In this example only subfolder-component3 requires additional config and is provided by additional-config.hcl.
Technical Details
tbd
Press Release
Terragrunt is a great tool to keep your terraform code DRY! With the latest version of terragrunt this got even better. Our original codebase contained a lot of copies of the very same hcl file. And now with the sophisticated template projection feature we were able to consolidate into one parameterized template.
Drawbacks
Terragrunt code can become even more abstract and complex.
Alternatives
Add a prepare step before running terragrunt and copy and merge files with classic file copy and merge operations.
Migration Strategy
At least manually someone can identity repeating hcl files and consolidate them into this new template projection feature.
Unresolved Questions
tbd
References
tbd
Proof of Concept Pull Request
tbd
Support Level
I have Terragrunt Enterprise Support
I am a paying Gruntwork customer
Customer Name
No response
The text was updated successfully, but these errors were encountered:
Take a look at Stacks which attempts to solve this problem in a slightly different way. If you like that approach, consider leaving your reaction or feedback there, then closing this RFC.
Summary
We really like terragrunt as it helps us keeping our codebase dry.
Although terragrunt could go one step further -
Currently we have a setup where every terragrunt component has more or less the same
terragrunt.hcl
.It would be super if there would be way to instruct terragrunt that a particular folder has a specific range of components, that are all using the same
terragrunt.hcl
without having to layout all those folders and copy the very sameterragrunt.hcl
everywhere.Additionally, it should be possible to add hcl on top this baseline folder hcl.
Motivation
Terragrunt is really helpful in keeping our code DRY, but currently we suffer from having the (almost) the same hcl files everywhere.
We would really like to slim down the amount of repeated code as much as possible.
Proposal
Although most probably not the best solution, but it could work:
.terragrunt-components.yaml
should contain a list with all desired components (separate terraform states):.terragrunt-template.hcl
contains the base hcl config that is executed for every specified component.In this example only
subfolder-component3
requires additional config and is provided byadditional-config.hcl
.Technical Details
tbd
Press Release
Terragrunt is a great tool to keep your terraform code DRY! With the latest version of terragrunt this got even better. Our original codebase contained a lot of copies of the very same hcl file. And now with the sophisticated template projection feature we were able to consolidate into one parameterized template.
Drawbacks
Terragrunt code can become even more abstract and complex.
Alternatives
Add a prepare step before running terragrunt and copy and merge files with classic file copy and merge operations.
Migration Strategy
At least manually someone can identity repeating hcl files and consolidate them into this new template projection feature.
Unresolved Questions
tbd
References
tbd
Proof of Concept Pull Request
tbd
Support Level
Customer Name
No response
The text was updated successfully, but these errors were encountered: