All Tools View Categories About Contact Privacy

Terraform Plan JSON to Diagram

Turn a saved Terraform plan JSON into a Mermaid graph of planned resource changes.

Runs entirely in your browser - nothing is uploaded and no cloud connection is made.
0
create
0
update
0
delete
0
replace
0
total
Your Mermaid diagram will appear here.

About Terraform Plan JSON to Diagram

The Terraform Plan JSON to Diagram tool converts a saved plan JSON into a readable Mermaid graph. Every planned resource becomes a node labelled with its address and the action Terraform will take, such as create, update, delete or a replace expressed as delete-create. This turns a dense JSON document that is hard to scan into a picture a teammate can understand in seconds. Plan JSON is machine friendly but human hostile: it buries the real story of a change inside nested objects and arrays.

Paste your terraform show -json output and get a diagram you can drop into pull requests, design docs or a Mermaid live editor. The graph centres on a single Plan node with each resource connected to it, so the blast radius of a change is obvious at a glance. Nothing is uploaded and no cloud connection is made, which keeps sensitive resource names private to your machine. Because the parser runs entirely in the browser, you can paste real plan output without worrying about leaking it to a third party service. This is ideal for reviewing infrastructure changes in code review, where a diagram communicates far more than raw JSON, and for onboarding engineers who are still learning to read plan output. It also helps non engineers such as tech leads and product owners grasp the impact of a proposed change.

Features

  • Plan JSON in - accepts the output of terraform show -json including saved plan files.
  • Mermaid out - produces a graph TD you can render anywhere that supports Mermaid, including GitHub.
  • Actions labelled - create, update, delete and replace are shown on each node for instant clarity.
  • Replace detection - delete-create combinations are labelled as a single replace action so downtime risk is visible.
  • Live stats - counts of each action plus the total number of resource nodes, updating on every generate.
  • Empty plans - a no change plan renders a clear "No resource changes" node instead of a blank canvas.
  • Format aware - the plan format version is shown on the central Plan node for reference.
  • Private - parsed entirely in the browser, nothing leaves your machine.
  • Copy / Download / Print - export the diagram text in .mmd form for reuse.
  • Sample loader - prefill a realistic plan JSON to see the output immediately.

How to Use

  1. Generate a plan JSON with terraform show -json from a saved plan file.
  2. Paste it into the input box on the left, replacing any placeholder text.
  3. Click Generate diagram to build the Mermaid graph from the resource changes.
  4. Review the stats showing how many creates, updates, deletes and replaces are planned.
  5. Copy or download the graph text as a .mmd file for later use.
  6. Render it by pasting into a Mermaid live editor or a fenced mermaid code block in Markdown.
  7. Share it in a pull request or a wiki so reviewers see impact quickly.
  8. Iterate - paste a different plan or adjust and regenerate to compare proposed changes.

Examples

Mixed plan: a plan that creates an S3 bucket, updates an instance and deletes a null resource yields three nodes connected to the Plan node, each labelled with its action.

Replace risk: a replace shown as aws_instance.db [delete-create] tells you immediately that the instance will be destroyed and recreated, which implies downtime. Spotting that early lets you plan around it before applying, perhaps by scheduling a maintenance window.

No changes: an empty plan renders a single "No resource changes" node so the diagram is never blank or confusing, which is useful when proving a plan is a no op.

Large plans: with dozens of resources the graph still lists every address and action, so you can scan for the one risky change among many safe ones.

Benefits

  • Fast review - see the blast radius of a plan at a glance instead of reading JSON.
  • Shareable - Mermaid renders in GitHub, wikis and most documentation systems automatically.
  • Safe - no data leaves the browser, so resource names stay private to your machine.
  • Clear - actions are labelled explicitly, including risky replaces that imply downtime.
  • Educational - helps new engineers learn how plan output is structured and what each action means.
  • Decision support - the stats row lets you set a risk bar before approving a change.
  • Portable - copy, download or print the diagram wherever it is needed.

Frequently Asked Questions

What input does this tool take?
Paste the JSON output of `terraform show -json` (the saved plan) or `terraform plan -out=plan.tfplan && terraform show -json plan.tfplan > plan.json`.
What does the diagram show?
Each planned resource becomes a node labelled with its address and the planned action (create, update, delete, or a replace such as delete-create).
Is this a live plan runner?
No. You paste an already-generated plan JSON. No cloud connection and no Terraform binary is required; everything runs in the browser.
How do I render the diagram?
Copy the Mermaid `graph` text into any Mermaid live editor, or embed it in Markdown with a mermaid code block.
Does it need a backend?
No. The parser and renderer are fully client-side.