Terragrunt Frequently Asked Questions
We know there's a lot to learn about Terragrunt. Here are the frequently asked questions that users have asked and that you might find helpful!
| Question | Answer |
|---|---|
| What is Terragrunt? | Terragrunt is a flexible orchestration tool that lets Infrastructure as Code written in OpenTofu/Terraform scale, adding tooling for keeping configurations DRY, managing dependencies, and running commands across many units at once. |
| How do I install Terragrunt? | Install Terragrunt with a package manager such as Homebrew, by downloading a prebuilt binary from the GitHub releases page, or by using the install script — then verify the install with `terragrunt --version`. |
| Why use Terragrunt instead of just OpenTofu/Terraform? | They have different jobs. OpenTofu/Terraform turn configuration into infrastructure. Terragrunt orchestrates many of those runs and absorbs the operational mess around them: segmented state, dependencies, targeted runs, retries, hooks, authentication, and caching. |
| What's the difference between a unit and a stack? | A unit is one piece of infrastructure with its own state, marked by a terragrunt.hcl file. A stack is a collection of units managed together, either as a directory tree of units or as a terragrunt.stack.hcl file that generates them. |
| Does Terragrunt create my state backend automatically? | Yes, if you ask it to. Pass --backend-bootstrap on a run, set TG_BACKEND_BOOTSTRAP, or run terragrunt backend bootstrap as its own step. Terragrunt does not create backend resources unless you opt in. |
| Is it safe to delete the .terragrunt-cache directory? | Yes. It is scratch space that Terragrunt recreates as needed, and it holds no state. If it keeps growing back, share provider downloads through a provider cache and let the Content Addressable Store deduplicate repository clones. |
| Terragrunt is running slowly. How do I speed it up? | Run fewer units with --filter, share provider downloads with the Provider Cache Server, and fetch dependency outputs from state instead of running output against every dependency. Measure first with OpenTelemetry traces. |
| How do I review plans across all my units? | Save the plans with --out-dir, and add --json-out-dir to get machine-readable copies you can filter with jq. The run summary tells you which units ran; the saved plans tell you what each one would do. |