FAQ

How do Terragrunt units and stacks work, and when should I use each?

A Terragrunt unit is a directory containing a terragrunt.hcl file. It is the smallest deployable entity in Terragrunt and is intended to be independently operable, atomic, and reproducible, so teams can isolate infrastructure changes to smaller portions of the system instead of applying changes to a large monolithic OpenTofu/Terraform root module. A stack is a collection of related units managed together: stacks let teams deploy multiple infrastructure components with a single command, manage dependencies between units, control the blast radius of changes, and organize infrastructure into logical groups. Terragrunt supports both implicit stacks, based on directory structure, and explicit stacks, defined with terragrunt.stack.hcl files. Use units to keep each piece of infrastructure independently deployable; use stacks when you need to operate a group of related units as one.

← All frequently asked questions

Supercharge Terragrunt for your Organization

Unlock Terragrunt’s full potential with Terragrunt Scale — purpose-built tooling that streamlines deploying and operating your infrastructure.

Automate your CI/CD

Pipelines is an out-of-the-box, best practices, secure CI/CD pipeline, built for Terragrunt, by the creators of Terragrunt.

Remediate infra drift

Terragrunt Drift Detection regularly compares your live cloud resources to your IaC and automatically opens pull requests to eliminate drift.

Keep your IaC Fresh

Terragrunt Patcher is a dependency management tool that keeps your OpenTofu/Terraform modules up to date, even through breaking changes.

Join the Terragrunt Newsletter!

Hear about the latest updates, features and innovations in Terragrunt.

Check out our other open source tools