Features

Everything Terraform state can't do.

Terraform stores your state as a JSON file behind a global lock. Stategraph stores it as a normalized graph in PostgreSQL. Same HCL, same modules, same providers. That one change underneath is where every feature on this page comes from.

Teams running Terraform on Stategraph

Zip logo PrizePicks logo Haus logo Avaloq logo Xanadu logo January logo Patients Know Best logo NOV logo Mixpanel logo Notable Health logo Skool logo

Read the case studies →

The difference underneath

It's the storage layer, not the syntax

Slow plans, lock contention, fragile cross-state wiring, and a state you cannot query all trace back to one decision: state is a file. Put it in a database and each of those problems stops existing.

Terraform and OpenTofu

Your HCLModules, providers, root modules
↓
terraform planLoads and refreshes every resource, every timeWork grows with the state, not the change
↓
One JSON file in a bucketOne global lock. Dependencies buried in attribute strings.

Cross-state reads see only the last apply. There is no query, no history, and no graph, so every question is a grep and every split is more wiring.

Stategraph

Your HCLThe same modules, providers, root modules
↓
stategraph planSized to the slice your change touches
↔
PostgreSQL graphEvery resource a row, every dependency an edge
↓
Terraform or OpenTofu appliesOn your runner, with your credentials

Locks are per resource. Cross-state plans see pending changes. SQL, an audit timeline, blast radius, and cost are queries over the same graph your applies write to.

97 s
No-op plan, 800 MB state
The same terraform plan: 3+ hours
2.0 s
One-line change
Down from 1m13s planning the whole state
8,680
Resources in one state
One root module, no fragmentation
0
Global locks
Conflicts detected per resource at commit

Measured on real states. Single benchmarks; results vary with state shape.

Cross-state plans

Producer and consumer in one plan

Change a producer module and its consumer updates in the same plan. Terraform's terraform_remote_state only ever reads the last applied state, so you apply the producer first and hope. Stategraph plans both states together and commits them in one transaction.

How cross-state plans work →
stategraph · cross-state plan
# change the producer (rm1) only ❯ stategraph plan State 0 · rm1 (producer) ~ output.http_proxy_port: 8080 → 9090 State 1 · rm2 (consumer, reads the pending output) ~ terraform_data.firewall_rule_port_min input: 8070 → 9080 Plan: 0 to add, 2 to change, 0 to destroy ✓ across 2 states, one plan, one apply

Real output. One plan updates rm1 and rm2 together.

Features

What the graph makes possible

Grouped by what changes for you. Each one links to a page with the details.

Faster plan and apply

Work proportional to the change

Terraform loads and refreshes the whole state on every plan. Stategraph reads only the slice a change can reach, so plan time stops growing with the estate.

2.0 sOne-line change on a state that took 1m13s to plan whole.
Faster plan & apply →

AI agents

Scope the key, not the prompt

"Only plan, never apply" in a system prompt is a suggestion a model can ignore. Stategraph puts the boundary in the credential: an agent gets a token that can plan but not apply, limited to the resources it is working on. Skill files teach the agent the workflows and the safe defaults.

0Paths from a plan-only token to an apply.
AI agents →

Compatibility

Same HCL. New substrate.

Stategraph sits underneath Terraform and OpenTofu. Keep writing the HCL you already write while state lives in a database. The compatibility reference maps Terraform's surface area command by command, including what the transaction model makes unnecessary.

Terraform compatibility reference →

Command for command

terraform plan→stategraph plan
terraform apply→stategraph apply
terraform import→stategraph import tf
terraform state mv→stategraph refactor
terraform output→stategraph query
terraform workspace select→stategraph states resolve
terraform force-unlock→stategraph tx abort
backend "s3" { ... }→stategraph.json

See it on your own state

Import an existing Terraform state and watch plans get faster, locks get smaller, and your infrastructure become queryable.