Documentation
Stategraph is infrastructure as code with a database underneath, and works with the Terraform and OpenTofu code that you have. Stategraph Orchestration runs plans and applies in your pull requests, with policy checks and approvals. Infrastructure as a Database replaces the state file, so plans read only what your change reaches, changes that do not overlap apply at the same time, and you can query every state with SQL.
Start here
Stategraph Cloud
Sign up, connect GitHub or GitLab, and run your first plan and apply from a pull request.
Self-hosted
Run Open Source with Docker Compose, or the Enterprise build with a license key.
Stategraph Orchestration
Orchestration works with GitHub and GitLab, as Open Source or Enterprise.
- Each pull request gets a plan comment, policy checks, and the required approvals.
- An apply runs on a
stategraph applycomment or on merge. - Drift detection runs on a schedule.
- Plans and applies run on your own GitHub Actions or GitLab CI runners, with Terraform, OpenTofu, the
stategraphCLI, Terragrunt, Pulumi, CDKTF, or any command-line tool. - Your state stays where it is, or you can keep it in Infrastructure as a Database.
Infrastructure as a Database
Infrastructure as a Database keeps your state in PostgreSQL as a graph of resources and dependencies, not as a state file:
- A plan reads only the resources that the change reaches.
- Locks hold single resources, not the full state.
- Each plan and apply is a recorded transaction.
- You can query all of your infrastructure with SQL.
Infrastructure as a Database also works without Orchestration, with your current CI system: see CI and orchestrators.
Why Stategraph
A Terraform state file is one JSON file per workspace, and each run locks all of it. Teams split the state so that they can work at the same time, and then connect the states by hand or with Terragrunt. Stategraph removes these limits.
State file
One run at a time.
Stategraph
Both at the same time.
With a state file, the second change waits for the lock.
With Stategraph, changes that do not overlap run at the same time.
State file
The full state locks.
Stategraph
Only the changed resources lock.
aws_db and aws_db_replica. With Stategraph, the rest of the state stays free for other changes.State files
One apply per state. A failure leaves a partial change.
Stategraph
One transaction. All states apply, or none do.
Adopt Stategraph in two steps:
- Start with Orchestration and the tool that you use now: Terraform, OpenTofu, Terragrunt, Pulumi, or CDKTF. Your state stays where it is.
- Change to the
stategraphengine, and import your state into Infrastructure as a Database. You can export it back to a Terraform state file.
Browse the docs
Get started
Infrastructure as a Database
Administration
For help, see Support.
