|
|
|
|
|
by thunfisch
1046 days ago
|
|
We're using Terragrunt with hundreds of AWS accounts and thousands of Terraform deployments/states. I'll never want to do this without Terragrunt again. The suggested method of referencing remote states, and writing out the backends will fall apart instantly at that scale. It's just way too brittle and unwieldy. Terragrunt with some good defaults that will be included, and separated states for modules (which makes partial applies a breeze) as well as autogenerated backend configs (let Terragrunt inject it for you, with templated values) is the way to go. |
|
The problems I have personally experienced with this approach are:
- if you update one of the root Terraform states, you need to execute a Terraform apply for every repo that depends on that Terraform state; developers do not do that because either they forget or they do know but are too lazy and subsequently are surprised that things are broken
- if you use workspaces for maintaining the infra in different environments, and certain components are only needed in specific environments, then the Terraform code becomes pretty ugly (using count which makes a single thing suddenly a list of things, which you then have to account for in the outputs which becomes very verbose)
Is Terragrunt something that would help us? I do not know Terragrunt, and a quick look at the website did not make that clear for me.