🏔️
Infrastructure as Code

Terragrunt

DRY wrapper for Terraform — manage many environments cleanly

🐧 Linux🍎 Mac🪟 Windows📋 Quick reference →
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

If you're on Terraform 1.7 or older

  • S3 native locking (use_lockfile) differs from DynamoDB — don't mix backends mid-migration
  • Provider version constraints: run terraform init -upgrade after bump
  • terraform test (1.6+) replaces some external test harness patterns

Alternative — team standard for Infrastructure as Code

What is this?

Terragrunt wraps Terraform so you can reuse modules across dev, staging, and production.

📁

Config files for Terragrunt

Where to create or edit the main configuration — paths below match the setup steps.

  • terragrunt.hcl

    Location: Each environment/module folder

    Remote state, inputs, and Terraform wrapper

📥

Step 01

Install Terragrunt

(01)Install Terragrunt

Linux
1wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.67.0/terragrunt_linux_amd64
2chmod +x terragrunt_linux_amd64 && sudo mv terragrunt_linux_amd64 /usr/local/bin/terragrunt
⚙️

Step 02

Configure Terragrunt

(01)Configure Terragrunt

Linux
1# terragrunt.hcl in each module folder
2terragrunt init
3terragrunt plan
4terragrunt apply

Step 03

Verify

(01)Verify installation

Linux
1terragrunt --version