Stategraph Cost

See what a Terraform change will cost, then what it actually cost

Cost estimates in your plan output, compared against real spend from your cloud provider. No separate tool, no CI bot.

In the plan output Estimates in under a second Estimates vs actuals

What you get

The price, before and after you apply

In the plan

The price of a change, under the diff

A plan lists what changes, not what it costs. The same stategraph plan you already run prints current versus planned cost after the diff, per state and per resource.

How plan-time cost works →
stategraph · plan
❯ stategraph plan --out plan.json Plan: 1 to add, 2 to change, 0 to destroy. Costs: Totals: Monthly: 130.82 USD → 140.16 USD (+9.34 USD) Hourly: 0.18 USD → 0.19 USD (+0.01 USD) Resources: 14 → 15 (+1) Coverage: 100.0% (unchanged) Per state: prod-network: +9.34/mo (resources +1) + aws_nat_gateway.main +9.34

current → planned, with the delta in green. Coverage is the share of resources that could be priced; the rest are listed.

Attribution

Who owns this spend

A per-file tool prices one plan. Stategraph rolls spend up by team, environment, owner, provider, or resource type across every state you manage.

Cost attribution →
Tenant monthly cost
$1,574
Coverage
51%
States priced
10
Most expensive resources
aws_db_instance.primary
RDS · Multi-AZ
$656/mo
aws_db_instance.replica_1
RDS
$329/mo
aws_elasticache_cluster.app_cache
ElastiCache
$240/mo
Monthly spend by team
data$1,149/mo
platform$133/mo
engineering$8/mo

Filter by provider, resource type, or tag · Illustrative figures

Estimates vs actuals

Then what it actually cost

Most cost tools stop at the estimate. Stategraph imports real spend from AWS, GCP, or Azure billing exports and lines it up against the estimate.

Cloud billing sources →

One aws_instance.web, a t3.large, added in a plan.

At plan time
~$60.74/mo
Estimate from public pricing
Within a day
$58.10/mo
Actual spend from your billing export

Illustrative figures. Actuals refresh daily from your cloud provider.

Query

Cost snapshots are tables

Cost is not a report you export. Every snapshot is a row in the same database as your resources, so spend over time is a query, and so is an alert.

Querying cost data →
stategraph · sql
❯ stategraph sql schema resources(type,name,provider,module,…) instances(address,attributes,dependencies,…) states(name,workspace,created_at,…) providers cost_snapshots

Real output captured from a live Stategraph instance.

How it behaves

Always on, never in the way

Never blocks a plan

The cost fetch waits up to --costs-wait seconds, 3 by default, and never holds up your plan.

Never goes stale

Costs recompute in the background on a schedule, so a state nobody has touched in six months still shows current prices.

Available over the API

The same delta is a JSON document at GET /api/v1/tx/{tx_id}/costs, for a merge gate or a Slack notice.

Cost visibility, in your terraform plan

Cost ships with Stategraph, not as a separate tool. See what a change costs before you apply it.

Get Started Book a Demo

Want the deep dive? Read Terraform Cost Estimation: Tools and How It Works.