Terraform Plan Viewer
Review terraform or OpenTofu plan JSON offline: destructive changes first, attribute diffs, blast radius, drift and risk flags.
Install
irm https://raw.githubusercontent.com/chayprabs/localtools/main/terraform-plan-viewer/install.ps1 | iexlocaltools-terraform-plan-viewer updatelocaltools-terraform-plan-viewer uninstall
curl -fsSL https://raw.githubusercontent.com/chayprabs/localtools/main/terraform-plan-viewer/install.sh | bashlocaltools-terraform-plan-viewer updatelocaltools-terraform-plan-viewer uninstall
brew install chayprabs/localtools/localtools-terraform-plan-viewerbrew upgrade localtools-terraform-plan-viewerbrew uninstall localtools-terraform-plan-viewer
scoop bucket add localtools https://github.com/chayprabs/homebrew-localtools; scoop install localtools-terraform-plan-viewerscoop update localtools-terraform-plan-viewerscoop uninstall localtools-terraform-plan-viewer
winget install localtools.TerraformPlanViewerwinget upgrade localtools.TerraformPlanViewerwinget uninstall localtools.TerraformPlanViewer
Opens at http://127.0.0.1:47115 in your browser. Run localtools-terraform-plan-viewer --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.
Direct download
| Platform | File | Size |
|---|---|---|
| Linux ARM64 | terraform-plan-viewer-1.0.3-linux-arm64.zip | 2.8 MB |
| Linux x64 | terraform-plan-viewer-1.0.3-linux-x64.zip | 3.1 MB |
| macOS Apple Silicon | terraform-plan-viewer-1.0.3-macos-arm64.zip | 2.9 MB |
| macOS Intel | terraform-plan-viewer-1.0.3-macos-x64.zip | 3.2 MB |
| Windows x64 | terraform-plan-viewer-1.0.3-windows-x64.zip | 3.2 MB |
SHA-256 checksums are in the release notes; the install scripts verify them for you.
See it
How to use
- Open Terraform Plan Viewer (it starts at http://127.0.0.1:47115).
- Save your plan as JSON: terraform plan -out plan.out, then terraform show -json plan.out > plan.json (tofu works the same).
- Drop plan.json or paste it, then press Analyze plan.
- Review destructive changes first, open a resource for its attribute diff and blast radius, and check the Drift, Outputs and Checks tabs.
- Copy the Markdown summary into your pull request, or download the JSON review.
- In CI: localtools-terraform-plan-viewer check plan.json --fail-on delete,replace exits 2 when the plan deletes or replaces anything.
FAQ
Can it read plan.out or the text output of terraform plan?
No. It reads the JSON from terraform show -json plan.out (or tofu show -json). Binary plan files need Terraform and provider schemas, and plan text is meant for people and hides values, so it is rejected with a hint instead of guessed at.
Are sensitive values safe?
Anything marked sensitive, and any structure containing a marked part, is shown only as (sensitive value) in the page, the Markdown, the JSON export and the CLI. As a precaution, an unmarked string equal to a marked one (8+ characters elsewhere in the plan, any length in the same resource) is shown as (matches a sensitive value); this also applies to import IDs and check messages. Plan variables are never echoed. Nothing leaves your machine.
How is the blast radius computed?
From the configuration block in the plan JSON: expression references, depends_on, count/for_each and module inputs and outputs. Each change lists the resources and root outputs downstream of it. References through local values cannot be traced because Terraform omits locals from plan JSON.
Does it work with OpenTofu?
Yes. OpenTofu writes the same plan JSON format. The engine is recognised from provider registry addresses; plans that use only built-in providers are labelled Terraform or OpenTofu, and the plan line then includes forget counts as OpenTofu prints them.
How large a plan can it handle?
Up to 64 MiB of JSON. A 59 MiB plan with 100,000 resources takes about 3 seconds; the page shows 200 resources at a time.