🌱 A safe enclosure for your Terraform state 🦎
Find a file
JMARyA 91aca4fad8
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/container/1 Pipeline failed
ci/woodpecker/push/container/2 Pipeline failed
ci/woodpecker/push/container-manifest unknown status
Merge pull request 'chore(deps): update rust crate serde_json to v1.0.149' (#4) from renovate/serde_json-1.x-lockfile into main
Reviewed-on: #4
2026-01-07 00:34:33 +00:00
.woodpecker ci: add ci 2025-12-29 11:59:49 +01:00
src fix: lock state sharing 2025-12-29 14:58:59 +01:00
.gitignore chore: init 2025-12-29 11:27:39 +01:00
Cargo.lock chore(deps): update rust crate serde_json to v1.0.149 2026-01-06 16:41:02 +00:00
Cargo.toml feat: user auth 2025-12-29 11:45:33 +01:00
cog.toml chore: add cog 2025-12-29 11:53:40 +01:00
docker-compose.yml chore: add compose 2025-12-29 11:53:15 +01:00
flake.lock fix: rust nightly 2025-12-29 12:34:34 +01:00
flake.nix fix: working dir 2025-12-29 13:54:41 +01:00
README.md feat: user auth 2025-12-29 11:45:33 +01:00
renovate.json chore: add renovate.json 2025-12-29 11:48:47 +01:00

🌱 Terrarium

A safe enclosure for your Terraform state. 🦎🪴

Terrarium is a small, boring, correct Terraform HTTP state backend.

It stores Terraform state as an opaque blob, provides strict locking, and stays completely out of your way.

No S3.
No Terraform Cloud.
No vendor assumptions.

Why does this exist?

Terraform state is:

  • critical
  • shared
  • easy to corrupt

Terrarium exists because:

  • storing state in Git is unsafe
  • S3 should not be mandatory
  • the Terraform HTTP backend deserves a first-class server

Features

  • 🌱 Terraform-compatible HTTP backend
  • 🔒 Strong, explicit state locking
  • 🪴 Opaque state storage
  • 🦎 Single static binary
  • 🧱 Cloud-agnostic
  • 🔐 Simple authentication

Terraform configuration

terraform {
  backend "http" {
    address        = "https://terrarium.example/state/prod"
    lock_address   = "https://terrarium.example/lock/prod"
    unlock_address = "https://terrarium.example/lock/prod"

    lock_method    = "POST"
    unlock_method  = "DELETE"
  }
}

You can provide auth credentials via the environment variables $TF_HTTP_USERNAME & $TF_HTTP_PASSWORD.
After that you need to reinit with tofu init. It will ask you to migrate any local state to the new backend.

User Management

Only authenticated users can interact with the terraform state files. To create a user, you can use the CLI:

terrarium user add <username>