Check what your infrastructure change costs — before you apply it

Most cloud bill surprises are born in a pull request. Someone adds an instance "just for staging", resizes a database, or duplicates a NAT gateway — and nobody notices until the invoice arrives. Terraform's own plan output tells you what will change, but not what it will cost.

DeployDiff's cost command reads provider-native cost metadata straight out of the plan file and prints the damage as a number you can act on: per-resource before/after monthly cost, plus a summary row for the total monthly delta.

Install

pip install git+https://github.com/Coding-Dev-Tools/deploydiff.git

DeployDiff is not published on public PyPI (publishing is pending) — the git+ command above is the documented pip path. Homebrew (brew tap Coding-Dev-Tools/tap && brew install deploydiff) and Scoop (scoop bucket add Coding-Dev-Tools https://github.com/Coding-Dev-Tools/scoop-bucket && scoop install deploydiff) are also available.

Run a cost estimate

# Terraform plan JSON
deploydiff cost --tf plan.json

# CloudFormation changeset
deploydiff cost --cfn changeset.json

# Supply custom pricing where the provider metadata is missing
deploydiff cost --tf plan.json --pricing custom-pricing.json

The output lists each affected resource with its estimated cost before and after the change, then a total row showing the monthly difference. No separate billing API calls, no spreadsheet math — one command between terraform plan and apply.

Pricing data comes from the plan itself

DeployDiff reads provider-native pricing metadata embedded in Terraform and CloudFormation plan artifacts. For resources where the provider doesn't include cost data, pass a custom pricing file:

deploydiff cost --tf plan.json --pricing custom-pricing.json

Gate expensive changes in CI

Combine cost with your pipeline's review step so a costly plan gets a human decision instead of an auto-apply:

# Show the cost delta right in the CI log next to the diff
deploydiff preview --tf plan.json
deploydiff cost --tf plan.json

# Fail loudly when the plan contains destructive changes
deploydiff preview --tf plan.json | grep -q "destroy" && echo "WARNING: Contains destructive changes!"

Works across three IaC providers

The same CLI handles Terraform plan JSON, CloudFormation change sets, and Pulumi preview files — so mixed-provider teams don't need three cost-review workflows. DeployDiff also pairs every estimate with a human-readable diff (preview guide) and generated rollback commands, so the full review loop — what changes, what it costs, how to undo — lives in one tool.

Pricing

The CLI is MIT-licensed, Python 3.10+, and runs fully offline with no telemetry. Cost impact estimation is part of the paid tiers (per the per-tier feature table): DeployDiff Individual $15/mo ($12 billed annually) unlocks unlimited stacks and multi-provider support; Suite $49/mo covers all 11 Coding Dev Tools CLI tools under one license; Team ($79/mo) adds shared reports and Slack alerts. The free tier includes the CLI with 1 plan comparison — enough to try the workflow end to end before upgrading.