A CLI tool to parse and summarize Terraform show JSON output from Terragrunt's run-all command, with detailed attribute-level change tracking.
This project was inspired by tf-summarize, which doesn't have proper multi-module Terragrunt support. tg-summarize provides a clean, colorized tree view showing which modules and specific attributes would change when applying your infrastructure.
git clone https://github.com/krmcbride/tg-summarize.git
cd tg-summarize
make installThis will build the binary and install it to ~/.local/bin/tg-summarize. Make sure ~/.local/bin is in your PATH.
git clone https://github.com/krmcbride/tg-summarize.git
cd tg-summarize
make buildThe binary will be created at dist/tg-summarize.
tg-summarize parses Terraform show JSON format with detailed before/after attribute tracking:
# Generate plan file
terragrunt run-all plan -out=tfplan
# Generate and summarize show output
terragrunt run-all show -json tfplan | tg-summarizeOr save the show output to a file:
terragrunt run-all show -json tfplan > plan-show.json
tg-summarize < plan-show.jsonDefault mode: Tree view with attribute-level changes
terragrunt run-all show -json tfplan | tg-summarizeExample output:
Terragrunt Plan
════════════════════════════════════════════════════════════
eks_cluster (+1 ~1 -1)
└─ module
└─ eks_cluster
├─ aws_eks_cluster
│ └─ eks ~
│ Changed attributes:
│ • version: 1.32 → 1.33
└─ null_resource
└─ wait_for_api ±
helm_release (+0 ~1 -0)
└─ helm_release
└─ karpenter ~
Changed attributes:
• repository_password: (sensitive value changed)
════════════════════════════════════════════════════════════
Summary: 4 modules with changes, +4 ~3 -3
Summary mode: High-level statistics only
terragrunt run-all show -json tfplan | tg-summarize --summaryExample output:
Terragrunt Plan Summary
════════════════════════════════════════════════════════════
Total modules analyzed: 22
Modules with changes: 4
Modules without changes: 18
Total changes:
Resources to add: 4
Resources to change: 3
Resources to remove: 3
Overall: +4 ~3 -3
--summary: Show only high-level summary statistics--no-color: Disable colored output--version: Show version information
- Green (+): Resources/values being added
- Yellow (~): Resources to be changed/updated
- Yellow (±): Resources to be replaced
- Red (-): Resources/values being removed
- Blue: Module names
- Cyan: Attribute paths and structural information
- Red → Green: Before/after value changes (old value in red, new value in green)
- ✅ Attribute-level change tracking: Shows exactly what changed (e.g.,
version: 1.32 → 1.33) - ✅ Intelligent JSON diff: Automatically parses and compares complex JSON values (policies, configurations)
- Structured diffs showing exact paths to changes (e.g.,
Statement[2].Principal.AWS) - Array comparison with positional matching for modified objects
- Shows added/removed items in arrays with clear labeling
- Structured diffs showing exact paths to changes (e.g.,
- ✅ Sensitive field detection: Automatically masks passwords, secrets, tokens, and keys
- ✅ Tree view: Clean hierarchical display of resource addresses
- ✅ Smart module naming: Extracts the most prominent module name from each plan
- ✅ Multi-module support: Handles Terragrunt run-all output with multiple modules
- ✅ Filters out modules with no changes
- ✅ Colorized terminal output for easy scanning (red/green diff style)
- ✅ Multiple output modes (tree, summary)
- ✅ Reads from stdin for easy piping
- ✅ Filters out data source "read" operations (not actual infrastructure changes)
- Go 1.25+ (for building from source)
- Terragrunt with OpenTofu or Terraform
Install development tools (formatters, linters):
make tools# Format code
make fmt
# Run linter
make lint
# Run tests
make test
# Build binary
make build
# Install to ~/.local/bin
make install# Install specific tools
make tool-gofumpt # Code formatter
make tool-goimports-reviser # Import formatter
make tool-golangci-lint # LinterMIT