Project journal
What Is StateDB?
StateDB is an infrastructure state backend built with Go and PostgreSQL, with an HTTP API for OpenTofu and Terraform.
Development log
0 entriesUpdates on StateDB’s development, design decisions, and testing.
No development entries yet.
Why I’m building it
StateDB is a project I'm building to experiment with a different way of handling Open Tofu and Terraform state.
Instead of treating state as a file sitting in object storage, StateDB stores and manages it through a Go API backed by PostgreSQL. The goal is to support normal HTTP backend functionality such as state storage, versioning, and locking, while eventually making things like history, auditing, search, and visualization easier to build.
I know Terraform and OpenTofu already have a pg backend. Those backends store the whole state payload as json in a PostgreSQL table, keyed by workspace, and support state locking. They don't break the state down into individual resource records.
The end goal is making the information inside that state easier to work with: querying resources, tracking changes, and eventually building history, auditing, and visualization around it.
The stack is intentionally simple:
Go + PostgreSQL and Apache AGE + Open Tofu or Terraform HTTP backend.
The first goal is just to make it work reliably as a backend.
After that, we'll see where it goes.