local/tools
dev / Native app / v1.0.3

Terraform Plan Viewer

Review terraform or OpenTofu plan JSON offline: destructive changes first, attribute diffs, blast radius, drift and risk flags.

Install

  • install
    irm https://raw.githubusercontent.com/chayprabs/localtools/main/terraform-plan-viewer/install.ps1 | iex
  • update
    localtools-terraform-plan-viewer update
  • remove
    localtools-terraform-plan-viewer uninstall

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

PlatformFileSize
Linux ARM64terraform-plan-viewer-1.0.3-linux-arm64.zip2.8 MB
Linux x64terraform-plan-viewer-1.0.3-linux-x64.zip3.1 MB
macOS Apple Siliconterraform-plan-viewer-1.0.3-macos-arm64.zip2.9 MB
macOS Intelterraform-plan-viewer-1.0.3-macos-x64.zip3.2 MB
Windows x64terraform-plan-viewer-1.0.3-windows-x64.zip3.2 MB

SHA-256 checksums are in the release notes; the install scripts verify them for you.

See it

How to use

  1. Open Terraform Plan Viewer (it starts at http://127.0.0.1:47115).
  2. Save your plan as JSON: terraform plan -out plan.out, then terraform show -json plan.out > plan.json (tofu works the same).
  3. Drop plan.json or paste it, then press Analyze plan.
  4. Review destructive changes first, open a resource for its attribute diff and blast radius, and check the Drift, Outputs and Checks tabs.
  5. Copy the Markdown summary into your pull request, or download the JSON review.
  6. 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.