Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Terragrunt

$ terragrunt Official High Risk
Gruntwork · Cloud & Infra · MIT · macos / linux / windows

Terragrunt (terragrunt) wraps Terraform and OpenTofu to keep remote state, provider blocks, and multi-module dependency graphs DRY via terragrunt.hcl. It supports --non-interactive (TG_NON_INTERACTIVE=true), terragrunt find --format json, --json-log, and run --all plan dry previews before applying.

FCRS-1.0 Score
82 /100
Good
Medium Confidence
Zero-Friction Install
brew install terragrunt
CLI vs MCP Decision CLI Preferred vs MCP

terragrunt executes DAG-ordered plan and find --format json across local HCL modules directly; MCP cannot replace local state/provider auth.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Provides --non-interactive, --json-log, and find --format json, and forwards -json to underlying output/show commands.

  • --non-interactive (TG_NON_INTERACTIVE=true) prevents stdin hangs
  • terragrunt find --format json and --json-log emit structured JSON
Trust & Safety 16 / 25

plan provides reliable dry-run diffs, but run --all apply/destroy can mutate or tear down production cloud infrastructure across many modules at once.

  • plan previews exact resource additions, changes, and deletions
  • run --all blast radius spans entire multi-account/multi-module stacks
Setup & Portability 13 / 15

Single static Go binary via Homebrew and GitHub Releases across macOS, Linux, and Windows, requiring terraform or tofu installed.

  • Cross-platform binary via brew install terragrunt; requires terraform or tofu
Utility & Efficiency 14 / 15

Standardizes remote state, dependency ordering, and DRY HCL orchestration across large Terraform/OpenTofu repos.

  • Orchestrates multi-module dependency DAGs with run --all
Maintenance & Lineage 9 / 10

Official Gruntwork project (gruntwork-io/terragrunt) licensed under MIT.

  • Official gruntwork-io/terragrunt repository
Docs & Verifiability 9 / 10

Extensive reference documentation at terragrunt.gruntwork.io covering the modernized CLI redesign.

  • Official CLI reference at terragrunt.gruntwork.io

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key Config File Service Account
Credential Storage

Inherits cloud provider credentials (AWS, GCP, Azure env vars/profiles) and remote state backend auth configured in terragrunt.hcl.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI is MIT open-source and free; provisioned cloud infrastructure incurs cloud provider billing.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Terragrunt Agent Rules
- Always run `terragrunt find --format json` and `terragrunt plan --non-interactive` before any `apply`.
- NEVER run `terragrunt run --all apply` or `terragrunt destroy` without explicit user confirmation of the full plan diff, as changes incur real cloud billing and outage risk.

Agent-Ready Command Recipes

Safe Read-Only Queries

Discover Terragrunt units in JSON
terragrunt find --format json

Lists discovered terragrunt.hcl units and stack structure as JSON without running Terraform.

Run a non-interactive multi-module plan preview
terragrunt run --all --non-interactive plan

Computes execution plans across dependent modules without applying infrastructure changes.

Controlled Writes & Previews

Apply a single module non-interactively after plan review
terragrunt apply --non-interactive -auto-approve

Applies changes to the targeted single unit only; prefer targeted apply over run --all apply in agent runs.

Strengths for Agents

  • + --non-interactive and find --format json make multi-module discovery and CI automation clean.
  • + run --all plan previews cross-module dependency diffs before touching cloud resources.
  • + Works seamlessly with both Terraform and OpenTofu binaries.

Caveats & Pitfalls

  • ! run --all apply or destroy carries a massive multi-module blast radius and real cloud billing impact.
  • ! Flag syntax evolved during the CLI redesign (legacy --terragrunt-* flags vs modern flags).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI