Terraform Plan and State Viewer
Review Terraform changes visually: a change summary, per-resource before and after values, known-after-apply and sensitive markers, modules and dependencies.
S'executa al teu navegador. Els fitxers mai no surten del dispositiu. Mira com comprovar-ho
…
Com es fa
- 1Export the plan
Run terraform show -json on your saved plan, or locate your state file.
- 2Open it
Press Open plan or state JSON, or paste the JSON in the JSON tab.
- 3Read the summary
Check the counts and the Plan line, especially destroy and replace.
- 4Inspect resources
Filter by action or address and click a resource for its attribute diff.
- 5Explore structure
Use By module and Dependency graph to see how resources relate.
- 6Share the review
Download the changes CSV for a ticket or pull request.
Sobre aquesta eina
A terraform plan in the terminal is long, and the important line, the database that will be replaced, can scroll past unnoticed. Terraform can write the same plan as JSON, which is what this viewer reads. It counts resources to create, update, replace, delete and read, lists them with the familiar +, ~, −/+ and − symbols, and shows every attribute's before and after value, marking values that are only known after apply and values Terraform treats as sensitive. A module tree groups resources by module and type, and a dependency graph drawn from the configuration's references shows what depends on what. State files work too, with each instance's attributes and recorded dependencies.
Who this is for
DevOps and platform engineers reviewing changes before apply, reviewers of infrastructure pull requests, and developers learning what their Terraform code actually manages.
Producing the files
Run terraform plan -out=plan.out and then terraform show -json plan.out > plan.json. For state, use the terraform.tfstate file or terraform show -json for the current state. Open the file or paste its JSON into the JSON tab.
The summary
The headline repeats Terraform's own count: a replace counts once as an addition and once as a destruction. Each action has a colour: green for create, amber for update, purple for replace, red for delete and teal for data sources being read. Filters hide actions you are not interested in, and the address filter finds resources quickly.
Attribute diffs
Select a resource to see only changed attributes, or tick show unchanged attributes for everything. Nested maps and lists are flattened to paths such as tags.Name or ingress[0].from_port. (known after apply) marks values computed by the provider, such as ids and ARNs. (sensitive) hides values marked sensitive in the plan, the way the CLI does. For replacements the attributes that force a new resource and the reason Terraform gives are shown.
Modules and graph
The module view groups resources first by module, then by resource type. The graph places resources without dependencies on the left and those that depend on them to the right, with boxes coloured by planned action. Edges come from the references in the plan's configuration block, or from the dependencies stored in each state instance.
Worked example
The sample plan has one subnet to create, an RDS instance whose allocated storage grows from 20 to 50 GB with a sensitive password change, a web server to replace because its AMI changes, a CloudFront distribution in module.cdn to destroy and an unchanged VPC. The summary reads Plan: 2 to add, 1 to change, 2 to destroy, and the graph shows the VPC, then the subnet, then the web server and database.
Limits
The viewer reads JSON only, not binary plan files or HCL source. Values marked sensitive are hidden, but a state file itself can still contain secrets in plain text, so handle it carefully even though nothing is uploaded here. Drift details, moved blocks and provider schemas are not interpreted, and the graph shows references, not Terraform's full internal graph.
Exemple resolt
Sample plan: Plan: 2 to add, 1 to change, 2 to destroy; web server replaced because the AMI changed.
En resum
- Categoria: Desenvolupament i dades
- S'executa al navegador, sense registre, sense pujar res.
- La informació que introdueixes es queda al dispositiu.
- Disponible en anglès.
- Contingut revisat per última vegada:
- Font oficial: HashiCorp Terraform JSON output format (terraform show -json): resource_changes, actions, after_unknown, sensitive values, configuration references; state format version 4
Preguntes freqüents
How do I get plan JSON?
terraform plan -out=plan.out, then terraform show -json plan.out > plan.json.
Why does a replace count as both add and destroy?
Terraform deletes the old object and creates a new one, so the CLI counts it in both totals; the viewer does the same.
What does known after apply mean?
The provider only learns the value when the resource is created or changed, for example a new id or IP address.
Can it read my remote state?
Download it with terraform state pull > state.json and open that file.
Are sensitive values shown?
No. Attributes marked sensitive in the plan appear as (sensitive).
Is my plan uploaded?
No. The JSON is parsed in your browser and stays in this browser's storage.
