Project journal

What Is StateDB?

StateDB is a project I'm building to experiment with a different way of handling Terraform state.

Instead of treating Terraform state mainly 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 Terraform HTTP backend functionality such as state storage, versioning, and locking, while eventually making things like history, auditing, search, and visualization easier to build.

But StateDB is also a learning project for me.

I haven't really had a chance to seriously code since I graduated college over 10 years ago, and even then, it was just a couple of semesters of C#. So those skills weren't exactly amazing to begin with. Since then, I've had to focus more on things like Terraform, PowerShell (a little python, but definitely not my strong suite), Azure DevOps pipelines, and a little bash sprinkled in.

So when I say I'm learning Go, I mean it took me two days to figure out how to query a PostgreSQL database. With StateDB, I get to learn while building something I'm genuinely interested in.

Is building a Terraform state backend the easiest or best way to learn Go?

No idea.

At work, we have to move fast, and I've leaned pretty heavily on tools like Codex to get things done. That's incredibly useful, but I've also noticed that some of the programming skills I used to have have gotten rusty.

StateDB is my excuse to slow down a little, write the code myself, break things, learn why they broke, and build some of those skills back.

The stack is intentionally simple:

Go + PostgreSQL + Terraform's HTTP backend.

The first goal is just to make it work reliably as a Terraform backend.

After that, we'll see where it goes.

Development log

4 entries