Terraform & IaC (50 Qs)•Part 2: Modules, Multi-Environment & GitOps (16 - 30)
What is Terragrunt, and how does it DRY up Terraform configurations?
junior LevelMost AskedFormsCI/CD & DevOpsTerraform & IaC
In Simple Words: Terragrunt is a thin wrapper around Terraform that:
- Keeps Backends DRY: Defines a single root
terragrunt.hclbackend configuration; all sub-environments inherit it without copy-pasting. - Promotes Immutable Modules: Enforces passing input variables directly to versioned Git modules without duplicate boilerplate.
- Dependency Orchestration: Supports
dependencyblocks to orchestrate multi-module applies in strict topological order (terragrunt run-all apply).