Build your own vs Stategraph
CI jobs, a bucket, a lock table, and a comment step work until two pull requests touch the same state. Stategraph puts a database under that pipeline, and runs the pull request layer if you want.
Teams running Terraform on Stategraph
How Stategraph is better
1. The pull request layer
Maintained by you, or included
On a state file, the lock table, comment step, approvals, drift, and cost are small systems you keep working. Stategraph Orchestration includes them.
Discover Orchestration →Illustrative. Each line on the left is a job you keep working.
2. Plan and lock scope
Sized to the change, not the state
A CI job on a state file refreshes every resource and locks the whole file, and no script changes that. Stategraph plans the part of the graph your change reaches and locks only those resources.
Learn about parallel applies →No-op plan on a real 800 MB production state, and each apply's lock.
One benchmark. Results vary with the shape of the state.
3. Query
SQL over your infrastructure
A pipeline leaves a state file in a bucket. Stategraph parses state into PostgreSQL, so inventory, blast radius, and who changed what are one query.
How you can query state →Real output captured from a live Stategraph instance.
4. Your pipeline
Keep the pipeline, add the database
Your workflow YAML, triggers, and secrets stay. Stategraph goes under them: export three variables and replace two commands.
GitHub Actions guide →GitHub Actions. GitLab CI, Jenkins, and CircleCI follow the same pattern.
Side by side
Build your own vs Stategraph: Key differences
| Capability | Stategraph | Build your own |
|---|---|---|
| Plan scope | ✓Only the affected subgraph | ✗The whole file, every run |
| Lock scope | ✓The resources a change touches | ✗The whole file, one apply at a time |
| Two pull requests, one state | ✓Both apply unless they overlap | ✗The second waits, or merges a stale plan |
| A change across states | ✓One atomic transaction | ✗Sequential jobs, partial failure is yours |
| Query your infrastructure | ✓SQL across every resource and state | ✗Grep the JSON, one file at a time |
| Approvals | ✓Per directory, with CODEOWNERS routing | ●Branch protection, one rule for the repository |
| Policy | ✓OPA, Conftest, and Checkov gates, with a named override | ●A Conftest step you write, no override |
| Drift detection | ✓Scheduled, in a maintenance window | ✗A cron job and a notification script |
| Cost | ✓Delta in the plan, thresholds in the pull request | ✗An external tool you wire in |
The last four rows are Stategraph Orchestration, on the same database.
Same HCL, new commands
How to switch
“We wanted to put some control and some process around that. It was no longer kind of acceptable to just be doing a Terraform plan and apply on our CLI, on our workstations.”
Stewart Baillie, DevOps Engineer at Integrated Marine Observing System · Read the case study →FAQ
Common questions
Try it with your own state
Import a state file and run your first plan in under 30 minutes. Pro is free for 30 days, no credit card.