Command-line tool that helps Terraform and OpenTofu infrastructure code scale through stacks, includes, hooks, and ordered execution.
Overview
Terragrunt wraps Terraform and OpenTofu workflows so large infrastructure estates stay organized. It lets teams break monolithic layouts into units and stacks with separate state, run modules in dependency order, and reuse shared configuration instead of copying provider and backend blocks everywhere.
Capabilities include includes for DRY configuration, before and after hooks for automation, built-in error handling for flaky networks or APIs, feature flags for gradual rollouts, a catalog and terminal UI for standard patterns, and scaffolding templates that generate IaC without hand-writing every file.
Authentication tooling is aimed at running the same code across many environments or cloud accounts with least-privilege access. Terragrunt also integrates with CI runners via a GitOps-oriented pipeline product aimed at Terragrunt repositories.
Install steps and full documentation are available on the Terragrunt website, with a Discord community for support and contributions. It serves as orchestration for OpenTofu and Terraform at scale.
Key features
- Infrastructure units and stacks
- Dependency-ordered run queue
- DRY includes for shared config
- Before and after automation hooks
- Built-in retry error handling
- Feature flags for gradual rollout
- Catalog and scaffold templates
- Multi-environment auth helpers
Use cases
- Multi-account Terraform layouts
- Reducing duplicated backend config
- Coordinating dependent module applies
- Standardizing org-wide IaC patterns
- CI-driven infrastructure pipelines