TFPrettyPlan
Terraform Plan Beautifier
Transform complex Terraform plans into readable, well-formatted output
Clear Infrastructure Changes
TFPrettyPlan transforms complex Terraform plans into readable, well-formatted output that helps you understand infrastructure changes at a glance. No more squinting at messy JSON output or struggling with truncated values.
Why TFPrettyPlan?
📊 Dynamic Formatting
Automatically adjusts column widths based on your terminal size for optimal readability
✂️ Smart Truncation
Context-aware truncation that preserves the most important parts of long values
🎨 Visual Clarity
Intelligently highlights resources that will be created, updated, or deleted
⚡ Lightweight
Fast CLI tool that integrates seamlessly into your existing Terraform workflow
Key Features
Dynamic Table Formatting
Automatically adjusts column widths based on your terminal size, ensuring optimal readability regardless of your environment:
- Standard Format - Balanced column widths for everyday use
- Wide Format - Expanded columns for viewing complex changes
- Custom Width - Set your preferred display width for consistent output
Smart Truncation
Context-aware truncation that preserves the most important parts of long values:
Path-like strings:
/very/long/path/with/many/nested/directories/file.txt
→ /very/long/.../file.txt
URLs and endpoints:
https://api.example.com/v1/very/long/endpoint/path
→ https://api.example.com/.../path
Configuration values:
Long configuration strings with important prefixes and suffixes
→ Long config...suffixes
Visual Highlighting
Clear visual indicators for different types of changes:
- 🟢 CREATE - New resources being added
- 🟡 UPDATE - Existing resources being modified
- 🔴 DELETE - Resources being removed
- 🔄 REPLACE - Resources being recreated
Terminal Integration
Seamlessly integrates with your existing Terraform workflow:
# Generate plan and beautify in one command
terraform plan -out=plan.tfplan && terraform show -json plan.tfplan | tfprettyplan
# Use with different formatting options
terraform show -json plan.tfplan | tfprettyplan --wide
terraform show -json plan.tfplan | tfprettyplan --width 120
Before & After
Before: Standard Terraform Output
# terraform show plan.tfplan
Terraform will perform the following actions:
# aws_instance.web will be created
+ resource "aws_instance" "web" {
+ ami = "ami-0c02fb55956c7d316"
+ arn = (known after apply)
+ associate_public_ip_address = (known after apply)
+ availability_zone = (known after apply)
+ cpu_core_count = (known after apply)
+ cpu_threads_per_core = (known after apply)
+ disable_api_stop = (known after apply)
+ disable_api_termination = (known after apply)
+ ebs_optimized = (known after apply)
+ get_password_data = false
+ host_id = (known after apply)
+ host_resource_group_arn = (known after apply)
+ iam_instance_profile = (known after apply)
+ id = (known after apply)
+ instance_initiated_shutdown_behavior = (known after apply)
+ instance_state = (known after apply)
+ instance_type = "t3.micro"
+ ipv6_address_count = (known after apply)
+ ipv6_addresses = (known after apply)
+ key_name = (known after apply)
+ monitoring = (known after apply)
+ outpost_arn = (known after apply)
+ password_data = (known after apply)
+ placement_group = (known after apply)
+ placement_partition_number = (known after apply)
+ primary_network_interface_id = (known after apply)
+ private_dns_name_options = (known after apply)
+ private_ip = (known after apply)
+ public_dns = (known after apply)
+ public_ip = (known after apply)
+ secondary_private_ips = (known after apply)
+ security_groups = (known after apply)
+ source_dest_check = true
+ subnet_id = (known after apply)
+ tags_all = (known after apply)
+ tenancy = (known after apply)
+ user_data = (known after apply)
+ user_data_base64 = (known after apply)
+ user_data_replace_on_change = false
+ vpc_security_group_ids = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
After: TFPrettyPlan Output
┌─────────────────────────────────────────────────────────────────────────────────┐
│ Terraform Plan Summary │
├─────────────────────────────────────────────────────────────────────────────────┤
│ 🟢 1 to add 🟡 0 to change 🔴 0 to destroy 🔄 0 to replace │
└─────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────┬────────────┬─────────────────────┬──────────────────────┐
│ Resource │ Action │ Attribute │ Value │
├──────────────────────┼────────────┼─────────────────────┼──────────────────────┤
│ aws_instance.web │ 🟢 CREATE │ ami │ ami-0c02fb55956c7d316│
│ │ │ instance_type │ t3.micro │
│ │ │ source_dest_check │ true │
│ │ │ user_data_replace.. │ false │
└──────────────────────┴────────────┴─────────────────────┴──────────────────────┘
Installation & Usage
Installation
# Install from releases
curl -L https://github.com/ao/tfprettyplan/releases/latest/download/tfprettyplan-linux-amd64 -o tfprettyplan
chmod +x tfprettyplan
sudo mv tfprettyplan /usr/local/bin/
# Or build from source
go install github.com/ao/tfprettyplan@latest
Basic Usage
# Standard workflow
terraform plan -out=plan.tfplan
terraform show -json plan.tfplan | tfprettyplan
# With formatting options
terraform show -json plan.tfplan | tfprettyplan --wide
terraform show -json plan.tfplan | tfprettyplan --width 120
terraform show -json plan.tfplan | tfprettyplan --compact
Use Cases
DevOps Teams
Improve plan review process with clear, readable output
Infrastructure Engineers
Quickly understand complex infrastructure changes
CI/CD Pipelines
Generate readable plan summaries for pull request reviews
Compliance & Auditing
Clear documentation of infrastructure changes for audit trails
Get Started
TFPrettyPlan is available as an open source CLI tool. Download pre-built binaries or build from source.
GitHub Repository • Latest Release • Documentation
Transform your Terraform workflow with TFPrettyPlan. Make infrastructure changes clear, readable, and review-friendly.