Stategraph runs Terraform and OpenTofu from pull requests, and can store your state as a dependency graph in PostgreSQL instead of a state file.
- Stategraph Orchestration plans every pull request on GitHub or GitLab and posts the result as a comment. Policy checks, cost estimates, and approvals run in the review. The apply runs on merge or on a comment. Open source and self-hostable.
- Stategraph Infrastructure as a Database stores each state as a graph in PostgreSQL. A plan reads only the resources your change reaches, changes that touch different resources apply at the same time, and you can query every state with SQL. Works from the CLI with any CI.
Start with stategraph/stategraph or the quickstart.