Terraform Plan Formatter
A minimal CLI tool to format Terraform plan output in a beautiful, human-readable format with expandable HTML output.
Installation
Quick Install (macOS/Linux)
|
Quick Install (Windows)
iwr -useb https://raw.githubusercontent.com/example/terraform-plan-formatter/main/install.ps1 | iex
Package Managers
Alpine Linux
Manual Installation
Download Pre-built Binaries
- Go to Releases
- Download the appropriate binary for your platform:
- macOS Intel:
tfplan-v0.1.0-x86_64-apple-darwin.tar.gz - macOS Apple Silicon:
tfplan-v0.1.0-aarch64-apple-darwin.tar.gz - Linux:
tfplan-v0.1.0-x86_64-unknown-linux-gnu.tar.gz - Windows:
tfplan-v0.1.0-x86_64-pc-windows-gnu.zip
- macOS Intel:
- Extract and place
tfplanin your PATH
Build from Source
Usage
# From file
# From stdin
|
# Generate HTML output
# Collapsed view (headers only)
# Interactive mode
Features
- Color-coded output for different actions (create, update, delete, replace)
- HTML output with expandable/collapsible sections
- Interactive mode for real-time expand/collapse
- Collapsed view for overview
- Cross-platform support (macOS, Linux, Windows)
- Terraform Cloud styling for familiar look and feel
Examples
Terminal Output
▼ + aws_instance.web will be created
ami: "ami-12345678"
instance_type: "t3.micro"
▼ ~ aws_s3_bucket.data will be changed
encryption: null => "AES256"
versioning: false => true
HTML Output
Interactive HTML with clickable expand/collapse functionality, dark theme, and syntax highlighting.
Development
# Build
# Test
# Build for all platforms
# Quick demo