terragrunt

Terragrunt

Terragrunt DRY wrapper for Terraform with hierarchical configurations and remote state management

Details

Language / Topic
terraformTerraform
Category
framework
Compatible Frameworks
terragrunt

Rules

balanced
- Define shared backend and provider configuration in a root `terragrunt.hcl` using `remote_state` and `generate` blocks — child configs inherit via `find_in_parent_folders()`.
- Use `dependency` blocks to reference outputs from other Terragrunt units: `dependency.vpc.outputs.vpc_id` — Terragrunt handles the state lookup automatically.
- Run `terragrunt run-all plan` from the environment root to plan all units in dependency order.
- Use `locals` in `terragrunt.hcl` to derive environment name and region from the directory path via `path_relative_to_include()` — eliminate per-environment variable duplication.