Runs Terraform/OpenTofu underneath

Plan in seconds, not minutes.

Infrastructure as a Database accelerates Terraform plan and apply. Seconds, not hours. Your HCL, modules, and providers carry over.

Traditional Backend
$ terraform plan
Refreshing state... [2847 resources]
!3m 47s elapsed...
Still refreshing: aws_instance.web[142]
VS
Infrastructure as a Database
$ stategraph plan
Computing change cone... [12 resources]
✓ Plan ready in 2.3s
Skipped 2835 unchanged resources
Start Free

See it in action

The Stategraph CLI — fast plans, blast radius analysis, SQL queries over infrastructure, and automated refactors.

stategraph

Want to see it on your infrastructure? Book a walkthrough

Real numbers. Real state file.

Benchmarked against an 800 MB Terraform state file with ~4,200 resources across 100 modules. Full methodology.

Terraform no-op
~3 hours
Refresh disabled
Stategraph no-op
97 seconds
Same state file

The difference is architectural. Terraform treats the entire state as the unit of work: global lock, full graph traversal, whole-state refresh on every operation. Stategraph narrows the unit of work to the minimal affected subgraph.

Get Started

How it actually works

Stategraph replaces the flat JSON state file with a PostgreSQL-backed dependency graph. Here is what changes under the hood.

Change Cone

Only touch what changed

When you run stategraph plan, a recursive SQL query walks the dependency graph to identify the minimal affected subgraph. Change an aws_vpc? Stategraph resolves only the VPC and its dependents, not the other 4,192 resources.

No-op plan on a real 800 MB production state.

terraform plan
3+ hours
Refreshes every resource
stategraph plan
97 seconds
Walks only the change

One benchmark. Results vary with the shape of the state.

change-cone
Traditional: Refresh all 4,200 resources → plan all → apply all
Stategraph:  Identify 8 affected resources → refresh 8 → plan 8 → apply 8
Resource Locking

Resource-level locking, not global lock

Traditional backends lock the entire state file. One person changing an EC2 tag blocks everyone else from planning against 2,000 other resources. Stategraph locks individual resources. Two engineers touching non-overlapping resources run in parallel with zero contention.

State file, one global lock
apply queue
✓ run #128: applied (0:04) ⏸ run #129: waiting, state locked ⏸ run #130: waiting ⏸ run #131: waiting ⏱ 12m elapsed · 3 runs waiting
Stategraph, one state
resource locks
✓ tx #128: applied (0:04) ✓ tx #129: applied (0:04) ✓ tx #130: applied (0:05) ✓ tx #131: applied (0:05) ⏱ 5s elapsed · 0 waiting

Illustrative: four changes to different resources in one root module.

Native Terraform Underneath

Your existing Terraform underneath

Stategraph delegates to the native terraform or tofu binary for provider execution. No custom providers, no HCL changes, no shims. Your .tf files, your modules, your providers, unchanged.

See the difference

Watch how Stategraph parallelizes your infrastructure operations

Traditional Backend

terraform apply 00:00
[VPC ] waiting
[Subnets ] waiting
[Security ] waiting
[RDS ] waiting
[ALB ] waiting
[ASG ] waiting
[Route53 ] waiting
[CloudFront ] waiting

Stategraph

stategraph apply 00:00
[VPC ] waiting
[Subnets ] waiting
[Security ] waiting
[RDS ] waiting
[ALB ] waiting
[ASG ] waiting
[Route53 ] waiting
[CloudFront ] waiting

Migrate with the CLI

Import your existing state and keep the same plan/apply workflow. Start with a local diagnostics run to see how your repo fits.

before
$ terraform plan -out=plan.json
$ terraform apply plan.json
after
$ stategraph plan --out plan.json
$ stategraph apply plan.json
migration (one-time)
# 1. Export existing state
$ terraform state pull > terraform.tfstate
# 2. Import into Stategraph
$ stategraph import tf --name <state-name> terraform.tfstate
# 3. Run your first plan
$ stategraph plan --out plan.json
Computing change cone... [12 resources]
✓ Plan ready in 2.3s
Get Started

More than fast plans

Graph-based state unlocks capabilities that flat files cannot support.

Blast radius before you apply

See the full downstream impact of any change before running plan. Stategraph walks the dependency graph and returns every resource at each distance from the target.

$ stategraph blast-radius "aws_vpc.main"
resource_address address index distance
aws_subnet.publicaws_subnet.public01
aws_subnet.privateaws_subnet.private01
aws_instance.webaws_instance.web02
aws_eip.webaws_eip.web02
stategraph · blast-radius
$ stategraph blast-radius "module.scrum.data.google_compute_network.shared_network_dev" DISTANCE RESOURCE 0 module.scrum.data.google_compute_network.shared_network_dev ← the change 1 module.scrum.google_redis_instance.agent_sandbox 1 module.scrum.google_redis_instance.memorystore_jobs 1 module.scrum.google_memcache_instance.memorystore 1 module.scrum.google_redis_instance.memorystore_v2

distance 0 = the changed resource · distance 1 = directly affected dependents

Query infrastructure with SQL

Your infrastructure is in PostgreSQL. Query it directly with SQL, the built-in query interface, to audit resources, find drift, or answer ad-hoc questions across your entire fleet.

stategraph · sql
$ stategraph query "SELECT type, COUNT(*) FROM resources GROUP BY type ORDER BY COUNT(*) DESC LIMIT 5" type count kubernetes_role_binding 586 kubernetes_manifest 382 null_resource 317 kubernetes_service 175 google_kms_key_ring 166 $ stategraph query "SELECT COUNT(*) FROM instances" count 7190

Real output captured from a live Stategraph instance.

Refactor without terraform state mv

$ stategraph refactor start
# rename resources, reorganize modules
$ stategraph refactor step
aws_instance.web → aws_instance.frontend
$ stategraph refactor complete
✓ Wrote moved blocks to moved.tf

Rename resources and reorganize modules. Stategraph detects the changes and generates moved blocks automatically.

Atomic multi-state transactions

$ stategraph tf mtx --out plan.json ./networking ./compute ./app
$ stategraph apply plan.json

Plan and apply across multiple state files in a single atomic transaction.

Explore the Docs

Try Infrastructure as a Database free.

Start on Pro free for 30 days. No credit card, and you stay on the Free plan after.

Start Free