Terragrunt infrastructure-as-code patterns with OpenTofu/Terraform - stacks, units, catalog patterns, CI/CD pipelines
npx claudepluginhub jfr992/terragrunt-skillTerragrunt infrastructure-as-code patterns with OpenTofu/Terraform
Share bugs, ideas, or general feedback.
A Claude Code skill providing best practices guidance for Terragrunt infrastructure-as-code with OpenTofu/Terraform.
Important: Catalog and Live repositories should be separate Git repositories. The live repo consumes units and stacks from the catalog via Git URLs.
┌─────────────────────────────────────────────────────────────────────┐
│ SEPARATE REPOSITORIES │
├─────────────────────────┬─────────────────────────┬─────────────────┤
│ Module Repos │ Catalog Repo │ Live Repo │
│ (terraform-aws-*) │ (infrastructure- │ (infrastructure-
│ │ <org>-catalog) │ <org>-live) │
├─────────────────────────┼─────────────────────────┼─────────────────┤
│ • OpenTofu modules │ • units/ (wrappers) │ • root.hcl │
│ • Semantic versioning │ • stacks/ (templates) │ • account.hcl │
│ • Terratest │ • References modules │ • Deployments │
│ • Pre-commit hooks │ via Git URLs │ • Consumes │
│ │ │ catalog │
└─────────────────────────┴─────────────────────────┴─────────────────┘
▲ ▲ │
│ │ │
└─────────────────────────┴────────────────────────┘
Live repo references both via Git URLs
┌───────────────────────────────────────────────────────────────┐
│ SEPARATE REPOSITORIES │
├─────────────────────────────────┬─────────────────────────────┤
│ Catalog Repo │ Live Repo │
│ (infrastructure-<org>-catalog)│ (infrastructure-<org>-live)
├─────────────────────────────────┼─────────────────────────────┤
│ • modules/ (OpenTofu modules) │ • root.hcl │
│ • units/ (module wrappers) │ • account.hcl │
│ • stacks/ (unit compositions) │ • Deployments │
│ • Discovered via `tg catalog` │ • Consumes catalog via Git │
│ • Single versioning strategy │ • `tg scaffold` for new │
└─────────────────────────────────┴─────────────────────────────┘
▲ │
└──────────────────────────────┘
Live repo references catalog
Trade-offs:
| Aspect | Option A (Separate Module Repos) | Option B (Modules in Catalog) |
|---|---|---|
| Versioning | Independent per module | Single catalog version |
| CI/CD | Dedicated pipeline per module | One pipeline for all |
| Complexity | More repos to manage | Simpler structure |
| Team ownership | Clear boundaries | Shared ownership |
terragrunt catalog | Discovers units/stacks | Discovers modules too |
"../unit" → dependency outputs)enabled and skip_outputsassume-role-with-web-identity)--provider-cache)This skill is distributed via Claude Code marketplace using .claude-plugin/marketplace.json.
/plugin marketplace add jfr992/terragrunt-skill
/plugin install terragrunt-skill@jfr992
# Clone to Claude skills directory
git clone https://github.com/jfr992/terragrunt-skill.git ~/.claude/skills/terragrunt-skill
After installation, try:
"Create a Terragrunt stack for a serverless API with Lambda, DynamoDB, and S3"
Claude will automatically use the skill when working with Terragrunt code.
# Ask Claude to scaffold a new catalog
"Create a new infrastructure catalog with units for S3, DynamoDB, and Lambda"