CLI tool
gruntwork-io/terragrunt avatar
gruntwork-io/terragrunt

Terragrunt: orchestrating OpenTofu and Terraform at scale

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.

9,854 stars1,227 forksGoMIT

At a glance

What is it?
Terragrunt is a Go-based wrapper around OpenTofu and Terraform that adds configuration inheritance, dependency ordering and multi-unit runs. It suits teams with many small state files; it is not a replacement for Terraform itself.
Who is it for?
Adopt Terragrunt if you already run OpenTofu or Terraform and your problem is repetition across many small state files, not the plan/apply engine itself. Do not adopt it if you have one root module and a handful of environments: the extra HCL layer and the terragrunt.hcl convention will cost more than they save.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem Terragrunt solves is repetition, not provisioning

Terraform and OpenTofu are good at describing resources and bad at describing repetition. A team with twenty services across three environments ends up with sixty working directories, sixty backend blocks that differ by one key, and sixty copies of the same provider constraints. Terragrunt exists to remove that duplication. The README describes it as "a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale", and the word to hold on to is orchestration. It does not plan or apply anything itself. It generates the configuration that Terraform or OpenTofu then reads, and it decides the order in which those runs happen.

The audience is therefore narrow and specific. If you have one root module and two environments, Terragrunt adds a layer without removing work. If you have a platform team maintaining shared modules for application teams, or a repository where every new service means copying a directory and editing four values, the duplication is the actual problem and Terragrunt targets it. The distinction matters because the tool is often evaluated as a Terraform alternative. It is not one. Every apply still goes through Terraform or OpenTofu, and every error message about a provider or a resource still comes from them.

How Terragrunt works: HCL generation plus a dependency graph

Terragrunt reads a terragrunt.hcl file in a working directory, resolves it against any parent configurations it includes, and produces the effective Terraform configuration for that unit. That resolution step is where inheritance happens: shared settings live in a parent file, and each unit overrides only what differs. The repository layout reflects this. The Go module in go.mod pulls in hashicorp/go-getter for fetching remote module sources, dario.cat/mergo for merging configuration maps, getsops/sops for encrypted values, and the AWS, Azure and Google SDKs for the object stores it can use as state backends. The presence of those SDKs is the clearest signal of what the tool does at runtime: it talks to cloud storage and lock tables directly rather than shelling out to a provider for that part.

The second half is ordering. Terragrunt builds a graph from the dependencies declared between units and runs them in sequence or in parallel, which is what makes a command that targets many directories useful. This is also the part that surprises people. Parallel execution against a shared backend is a concurrency problem, and the documentation for your backend's locking behaviour is the relevant reading, not Terragrunt's. The go.mod also lists terragrunt-engine-go, a separate module, which indicates the run engine is being factored out of the main binary rather than living entirely inside it.

Installing Terragrunt and running a first plan

The README does not reproduce install commands. It points to the project website and to a getting started quick start page under docs.terragrunt.com, and it lists the releases. Get the binary from the releases page or follow the install instructions on the site rather than copying a command from a blog post, because the supported package channels are documented there and not here.

The repository gives one concrete build path for anyone working from source. The Makefile defines a build target that compiles the binary with CGO disabled and stamps the version from git describe, and the resulting file is named terragrunt.

bash
make build

Running that target produces a terragrunt binary in the repository root. The Makefile also defines a clean target that removes it, and a fmt target that runs gofmt over the Go sources.

bash
make clean

Beyond building from source, the README does not list install commands, and it does not document a terragrunt.hcl example, so the configuration shape has to come from the documentation site rather than from the repository README. What the README does give is the version history: the release tags follow a v-prefixed semantic version scheme, with v1.1.4 published on 2026-08-27, and the README announces that Terragrunt v1.0 is here.

Where Terragrunt gets in the way

The cost is a second configuration language. Terragrunt's HCL is not Terraform's HCL, and the functions, blocks and merge semantics are its own. A new engineer has to learn which file wins when a parent and a child both set a value, and that is the class of question that produces long debugging sessions. The repository's own tooling hints at the surface area: the Makefile contains a target that greps go:build tags out of the source to construct a lint tag list, which implies a build matrix wide enough that linting needs to know about feature flags.

There is a second, sharper limitation. Because Terragrunt generates configuration and orchestrates runs, when something goes wrong you have two places to look. A malformed generated file produces a Terraform error that names a path you did not write. That indirection is the price of the abstraction, and it is worse for engineers who have not yet internalised how Terragrunt resolves includes.

Finally, consider the case where Terragrunt is the wrong tool. If your infrastructure is one module applied once, or if your team has standardised on a different orchestration layer, adding Terragrunt means maintaining a wrapper for no reduction in duplication. The README's own framing, that it lets IaC "scale", is a claim about many units. With few units there is nothing to scale.

Terragrunt against plain Terraform and against Atmos

The most common comparison is Terragrunt against Terraform used directly. Plain Terraform with a well-organised module registry and a CI pipeline that loops over directories can reach a similar outcome. The difference is where the logic lives: with plain Terraform the looping, the backend key derivation and the ordering live in your CI scripts and your shell, and with Terragrunt they live in HCL that the tool understands. That is a real trade. Shell is easier to debug for most engineers; HCL is easier to review and harder to accidentally break with an unquoted variable.

The other comparison that appears in search data is Atmos. Both wrap Terraform, and the difference in approach is where the configuration model sits. Terragrunt's model is per-directory: the terragrunt.hcl in the folder you are standing in is the unit of work, and inheritance flows through includes. Atmos organises around stacks and components defined in a central configuration. If your mental model is a filesystem tree of environments, Terragrunt maps onto it directly. If you want one file that describes every environment and component, that is the other shape. Neither is a superset of the other, and migrating between them is a rewrite of the configuration layer, not a flag change.

Maintenance, licensing and what an upgrade costs

The repository is not archived, and the last push was on 2026-08-27, which is recent. Releases arrive on a steady cadence: v1.1.2 on 2026-07-29, v1.1.3 on 2026-08-13, v1.1.4 on 2026-08-27. The README announces that Terragrunt v1.0 is here, so the project has crossed a stability boundary and the version numbers now move in the patch range rather than the pre-1.0 range. The code is MIT licensed, which permits commercial use and modification; the repository also links to a commercial support offering, and MIT does not create any support obligation on the maintainers. That is a licensing observation, not legal advice, and anyone redistributing a modified binary should read LICENSE.txt themselves.

Upgrade cost is dominated by two things. First, the Terragrunt version and the OpenTofu or Terraform version are separate pins, and a Terragrunt upgrade does not move the engine underneath it. Second, because Terragrunt generates configuration, a change in how includes or merges resolve can alter generated files across every unit at once. The repository ships a docs directory and a test directory, and the release notes are the place to check for behaviour changes before bumping a pinned version in CI.

Editorial conclusion

Adopt Terragrunt if you already run OpenTofu or Terraform and your problem is repetition across many small state files, not the plan/apply engine itself. Do not adopt it if you have one root module and a handful of environments: the extra HCL layer and the terragrunt.hcl convention will cost more than they save. Before committing, verify three things: that the release you pin exists on the releases page, that your state backend supports locking under the parallel run behaviour you intend to use, and that your team accepts a second configuration language on top of HCL. Terragrunt is a wrapper, so a broken plan is still a Terraform problem.

Frequently asked questions

What is Terragrunt vs Terraform?

Terraform is the engine that plans and applies resources. Terragrunt is a wrapper that generates the configuration Terraform reads and orders runs across many working directories. Every apply still goes through Terraform or OpenTofu.

What is a Terragrunt?

According to the README, Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu or Terraform to scale. It is written in Go and released under the MIT License.

Is Terragrunt deprecated?

No. The repository is not archived, the README announces Terragrunt v1.0, and releases continued through v1.1.4 on 2026-08-27.

What is the key difference between Atmos and Terragrunt?

Terragrunt's unit of work is the terragrunt.hcl file in a directory, with inheritance through includes. Atmos organises around stacks and components declared in a central configuration. The configuration layer differs, so moving between them is a rewrite.

How do I install Terragrunt?

The README does not list install commands. It points to the project website and to the getting started quick start page under docs.terragrunt.com, and it links to the releases for the binaries.

How do I use Terragrunt with Terraform or OpenTofu?

Terragrunt wraps the engine rather than replacing it, resolving the terragrunt.hcl configuration before passing work to Terraform or OpenTofu. The README points to the documentation site for the command reference.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/gruntwork-io-terragrunt.svg)](https://hysenlabs.com/projects/gruntwork-io-terragrunt)