(no title)
slillibri | 1 year ago
2) I use terragrunt to provide inherited values, such as region, environment, etc. I have a directory tree of `dev/us-west-2/` I can set a variable in my `dev/environment.hcl` that is inherited across everything under that environment. This is useful if you have more than one dev, prod, etc environment.
3) I use terragrunt to allow shared, versioned root modules. I don't include any terraform in my terragrunt repo. The terragrunt repo is just configuration. In my terragrunt.hcl I can reference something like `source = "github.com/example.com/root.git//ipv6-vpc?ref=v0.1.3"` to pull in the version of the root module I want. Again this is useful if you have multiple dev/stage/prod environments.
None of this is actually possible with plain terraform.
spicyusername|1 year ago
Using variables isn't supported in backends - e.g. "niche places" (although it sounds like it is in OpenTofu)
And #2 and #3 are exactly the use-case for just regular old tfvars files and module imports.
Terragrunt encourages you to abstract things way, way too far, until you have an absolute mess of tangled imports and deeply nested directories.
Nothing wrong with having a root module, some child modules, and a single tfvars file being fed in on the front end.