Terraform Plan Diff Viewer
Compare two Terraform plans side-by-side to easily identify changes between environments or versions.
About Terraform Plan Diff Viewer
Terraform is an infrastructure as code tool that allows you to define and provision infrastructure resources across multiple cloud providers. Understanding the differences between Terraform plans is crucial for safely deploying changes to your infrastructure.
Why Compare Terraform Plans?
- Identify changes between environments (dev, staging, production)
- Review changes before applying them to critical infrastructure
- Track infrastructure evolution across time as requirements change
- Validate that changes made to Terraform code produce the expected infrastructure changes
How to Use
- Generate a Terraform plan output for your "before" state using
terraform plan
- Paste this output in the "First Plan" box
- Generate another Terraform plan output for your "after" state
- Paste this output in the "Second Plan" box
- Click "Compare Plans" to see the differences
Pro Tip
For more detailed diffs, use terraform plan -out=plan.tfplan
to save your plan, then terraform show -json plan.tfplan > plan.json
to convert it to JSON format. JSON formats provide more structured data for comparison.
Common Terraform Plan Changes
- Create - New resources that will be provisioned
- Update in-place - Existing resources that will be modified without replacement
- Replace - Resources that will be destroyed and recreated
- Destroy - Resources that will be removed completely