---
name: "terragrunt-dry-infrastructure"
description: "Keep Terraform code DRY across multiple AWS accounts, regions, and environments with Terragrunt."
metadata:
  author: "Gruntwork"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "keep terraform dry terragrunt"
  - "terragrunt dependency block"
  - "run terragrunt run-all apply"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Terragrunt DRY Multi-Account Infrastructure Orchestration

Structures cloud infrastructure with Terragrunt: using terragrunt.hcl, include blocks for root configurations, dependency blocks for inter-module data passing, and executing run-all apply across multiple stacks.

## When to Invoke
Invoke this skill whenever you need to:
- keep terraform dry terragrunt
- terragrunt dependency block
- run terragrunt run-all apply

## Execution SOP & Rules
1. Define root terragrunt.hcl generating remote state and provider blocks automatically.
2. In leaf module terragrunt.hcl, use include 'root' { path = find_in_parent_folders() }.
3. Declare cross-module dependencies: dependency 'vpc' { config_path = '../vpc' }.
4. Run terragrunt run-all apply --terragrunt-non-interactive to deploy in topological order.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
