PROVIDER - DRY orchestration wrapper for Terraform

Terragrunt

Terragrunt is the DRY wrapper for Terraform and OpenTofu, collapsing backend and provider configuration into 1 directory hierarchy, resolving dependencies automatically and running 20+ modules with run-all; the costs are an abstraction layer and upstream compatibility tracking.

Developer Tools United States 2026.11.19
3.8pts

Detailed Notes

Pros 5 items

Wraps Terraform and OpenTofu so duplicated backend and provider configuration collapses into 1 definition
Uses 1 directory hierarchy to express environments and modules while resolving dependency order automatically
Generates remote state and locking configuration so 1 definition replaces per-module backend blocks
Ships a run-all command that executes 20+ modules with inferred parallelism and sequencing
Maintained and open sourced by Gruntwork under Apache 2.0 for commercial use

Cons 4 items

Depends on the Terraform or OpenTofu ecosystem and must follow upstream version changes
The extra abstraction layer costs onboarding time since newcomers learn 2 tools at once
run-all can leave state inconsistent when part of a large repository fails
Official documentation is practice-oriented and lacks a structured beginner path

Service Overview

Terragrunt is Gruntwork's open source wrapper for Terraform and OpenTofu. It does not replace Terraform; it adds directory organisation, configuration reuse and bulk execution on top, solving the duplication that large IaC repositories always accumulate.

In the development tools category it is the advanced tier of infrastructure as code: its value appears once a team grows from a few modules to dozens across several environments.

Key Strengths

  • DRY configuration: backend, provider and version constraints defined once instead of per module
  • Directory as architecture: environment and module relationships live in 1 hierarchy
  • Dependency orchestration: apply order is derived automatically, avoiding manual sequencing errors
  • Bulk execution: run-all processes 20+ modules in one pass
  • Dual ecosystem: supports both Terraform and OpenTofu

Product Ecosystem

Platform capabilities

Configuration inheritance, remote state generation, dependency resolution, bulk runs, hooks and cache directory management.

Integrations

Works with Terraform, OpenTofu, Terragrunt Scale, GitHub Actions, Atlantis and any state backend.

Typical scenarios

Multi-account and multi-environment management, monorepo IaC, cross-module dependency orchestration and enterprise infrastructure platforms.

Limitations

  • Ecosystem dependency: fully tied to the Terraform and OpenTofu release cadence
  • Abstraction cost: newcomers learn 2 layers plus HCL extensions
  • Bulk risk: partial run-all failures can leave state inconsistent and need manual fixes
  • Documentation depth: official material is practice-led with no systematic beginner path

Use Cases

  • Multi-environment, multi-account IaC (★★★★★): hierarchy and inheritance pay off most
  • Repositories with exploding module counts (★★★★★): dramatically less duplication
  • Small single-module projects (★★☆☆☆): plain Terraform is simpler
  • Strong dependency ordering needs (★★★★☆): automatic sequencing removes manual work

Pricing

Item Price Notes
Terragrunt itself $0 Apache 2.0 open source, commercial use allowed
Gruntwork subscription Contact sales IaC library, reference architecture and support
Self-hosted CI Platform billing Depends on concurrency and runtime

FAQ

Does Terragrunt replace Terraform?

No. It invokes Terraform or OpenTofu for the actual plan and apply and only handles orchestration and configuration generation.

Can I skip writing backend configuration?

Yes. The remote_state block generates backend configuration, so no module needs a hand-written copy.

How does it compare with Terraform workspaces?

Workspaces suit a small number of similar environments; Terragrunt fits large divergences and many modules.

Is OpenTofu supported?

Yes. Terragrunt is adapted to OpenTofu and can use it as the execution engine.

Code Examples

# Root terragrunt.hcl: generate remote state centrally
remote_state {
  backend = "s3"
  generate = {
    path      = "backend.tf"
    if_exists = "overwrite"
  }
  config = {
    bucket = "my-tf-state"
    key    = "${path_relative_to_include()}/terraform.tfstate"
    region = "us-east-1"
  }
}
# prod/app/terragrunt.hcl: inherit the root and declare a dependency
include "root" {
  path = find_in_parent_folders()
}

terraform {
  source = "../../../modules/app"
}

dependency "network" {
  config_path = "../network"
}

inputs = {
  vpc_id = dependency.network.outputs.vpc_id
}
# Run every module in the tree, here 20+
terragrunt run-all plan
terragrunt run-all apply

Community & Resources

Visit Terragrunt Website → https://terragrunt.gruntwork.io/
Visit Website ↗