Clouds¶
burrow up aws, burrow up gcp and burrow up azure create a Kubernetes cluster, a managed PostgreSQL
and file storage with Terraform, then install the Helm chart into the new cluster.
Not yet applied against real accounts. The three modules in
deploy/terraform/passterraform validate. Nobody has run--applyagainst a real cloud account yet. Read the plan carefully, expect fixes, and do not use them for production data until they have been proven.
How it works¶
burrow up aws # terraform init + terraform plan -out=burrow.tfplan; nothing is created
burrow up aws --apply --yes # applies exactly that saved plan; creates billable resources
- The module and the chart are written to
~/.burrow/stacks/<target>(--stack NAMEgives each environment its own directory, state and resource names;--dirto choose the directory). An existingmain.tfis never overwritten;--upgrade-modulereplaces it with this binary's copy. The directory is0700and the state, plan and variable files0600: they hold the database passwords, the S3 key and cluster credentials. - Without
--apply,burrow upprints the account (or project or subscription) and region your credentials point at, runsterraform initandterraform plan -out=burrow.tfplan, then stops. Review the plan. --applyneeds--yesas well. It applies the savedburrow.tfplanand nothing else, so what is created is what you reviewed, then printsterraform output -json.
Settings come from Terraform variables: TF_VAR_* in the environment, or a terraform.tfvars file in
the stack directory (--image and --replicas on the plan step are written to
burrow.auto.tfvars.json). Every module has:
| Variable | Default | Meaning |
|---|---|---|
name |
burrowdb |
Prefix of every resource |
image |
ghcr.io/test-zeus-ai/burrowdb:0.1.1 |
repo:tag, repo@sha256:... or both; registry ports are fine |
api_replicas |
3 |
API replicas |
superuser_email, app_url |
- | First superuser, public URL |
public_lb |
false |
false: the API Service gets an internal load balancer, reachable only inside the network. true: an internet-facing one (plain HTTP), which needs lb_source_ranges |
lb_source_ranges |
[] |
Client CIDRs allowed to reach the load balancer |
api_allowed_cidrs |
["0.0.0.0/0"] |
CIDRs allowed to reach the Kubernetes API endpoint. Narrow it to the addresses you run Terraform and kubectl from |
burrow up needs terraform on your PATH, plus the cloud's CLI for credentials.
Until the first release image is published, build one (docker build -t REGISTRY/burrowdb:TAG .),
push it to a registry the cluster can pull from, and pass --image REGISTRY/burrowdb:TAG.
Terraform state¶
The state is local to the stack directory and holds secrets (database passwords, the S3 key, the
cluster's credentials). Keep it on an encrypted disk and back it up. For a team, move it to a remote
backend with encryption and locking before the first apply, by adding a backend.tf next to main.tf
(an S3 bucket with a DynamoDB lock table or use_lockfile, a GCS bucket, or an Azure storage
container), and never commit terraform.tfstate, *.tfplan or *.tfvars.
Who can reach what¶
- The API. By default, an internal load balancer: reach it from inside the network (a VPN, a
bastion, or
kubectl port-forward). To serve the internet, put an Ingress with TLS in front (ingress.*in the chart values), or setpublic_lb = truewith an explicitlb_source_rangesallow-list. A public load balancer serves plain HTTP, and/metricsanswers without authentication on the same port. - The Kubernetes API. Public endpoint limited to
api_allowed_cidrs. - PostgreSQL. Private only: reachable from the cluster, never from the internet.
- The database role. The admin login (
burrow_admin) is used only by the chart'sdb-bootstrapinit container to create the app roleburrow(LOGIN CREATEDB, not a superuser) and its databases. burrowDB always connects asburrow.
Tear down¶
Deletion protection is on by default (deletion_protection, AWS and GCP), so burrow down alone
fails on purpose. The sequence:
# 1. lift the protections and apply that change
echo 'deletion_protection = false' >> ~/.burrow/stacks/aws/terraform.tfvars
echo 'force_destroy_bucket = true' >> ~/.burrow/stacks/aws/terraform.tfvars # deletes every file and backup
burrow up aws && burrow up aws --apply --yes
# 2. destroy
burrow down aws --yes # terraform destroy in the stack directory
On AWS the destroy leaves a final RDS snapshot named <name>-final-<random>; delete it yourself when
you no longer need it. Without force_destroy_bucket a bucket that still holds files stops the
destroy: empty it first, or keep it and remove it from the state (terraform state rm).
AWS¶
aws configure # or any credentials the AWS provider reads
TF_VAR_region=eu-west-1 TF_VAR_superuser_email=admin@example.com burrow up aws
Creates:
- A VPC (
10.42.0.0/16) with private, public and database subnets in three zones, with one shared NAT for outbound traffic. - EKS 1.34 with a managed node group of Graviton
t4g.largenodes (2 to 6, 3 to start). - RDS for PostgreSQL 17 (
db.t4g.medium), gp3, encrypted, Multi-AZ, 7 days of automated backups, Performance Insights, deletion protection, a final snapshot, and a parameter group withjit=0andidle_in_transaction_session_timeout=60000. Only the cluster's nodes can reach it. - An S3 bucket with public access blocked, versioning (old versions kept 30 days), a policy that refuses plain-HTTP requests, and an IAM user with an access key limited to that bucket. The engine's S3 client signs with static access keys only; IRSA is on the roadmap. The key can delete objects, so versioning is what makes a deletion recoverable.
- The Helm release: 3 API replicas, 2 pgbouncers, an internal load balancer, PostgreSQL over TLS.
Variables: region (us-east-1), db_instance_class (db.t4g.medium), node_instance_types
(["t4g.large"]), deletion_protection (true), force_destroy_bucket (false). Outputs: kubeconfig_command, postgres_host, bucket,
superuser_password_command.
Google Cloud¶
gcloud auth application-default login
TF_VAR_project=my-project burrow up gcp
TF_VAR_project=my-project burrow up gcp --apply --yes
Creates:
- A VPC and subnet, with private services access so Cloud SQL gets an address inside the VPC.
- GKE Autopilot, its API limited to
api_allowed_cidrs. - Cloud SQL for PostgreSQL 17 (
db-custom-2-7680), Enterprise edition, regional (high availability), private IP only, backups with point-in-time recovery, deletion protection,max_connections=400,jit=off,idle_in_transaction_session_timeout=60000. - A GCS bucket with versioning (old versions kept 30 days), a service account with access to it, and an
HMAC key. Files and backups reach GCS through its S3-compatible XML API (
https://storage.googleapis.com). - The Helm release: 3 API replicas, 2 pgbouncers, an internal load balancer.
Variables: project (required), region (us-central1), db_tier, deletion_protection (true,
covers the cluster and the database), force_destroy_bucket (false). Outputs: kubeconfig_command,
postgres_host, bucket.
Azure¶
az login
ARM_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000 burrow up azure
ARM_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000 burrow up azure --apply --yes
Creates:
- A resource group, a VNet with a subnet for AKS and a delegated subnet for PostgreSQL, and a private DNS zone.
- AKS with an autoscaling node pool of
Standard_D4ds_v5(2 to 6 nodes). - Azure Database for PostgreSQL Flexible Server 17 (
GP_Standard_D2ds_v5), private access only, storage auto-grow, 7 days of backups,jit=off,idle_in_transaction_session_timeout=60000,pgcryptoallow-listed. Single zone unlesshigh_availability = true(zone-redundant standby, roughly double the database cost). - The Helm release: 3 API replicas, 2 pgbouncers, an internal load balancer, and in-cluster MinIO
for files and backups on a 100 GiB premium managed disk (
managed-csi-premium).
The Azure module's file storage is dev-grade. Azure Blob Storage has no S3-compatible API, so the module runs the chart's bundled MinIO: one replica, one disk, holding every uploaded file and every backup, from an image that no longer receives updates. Losing that disk loses both. Use it to try burrowDB on Azure; for production, point
s3.*at an external S3-compatible store and keep backups in a different place. A native Blob driver is on the roadmap.
The database has no deletion protection setting on Azure: guard it with a resource lock
(az lock create --lock-type CanNotDelete) if you need one. Terraform's Helm provider talks to AKS with
the cluster's admin client certificate from the state; enable Microsoft Entra ID integration and
local_account_disabled on the cluster if you need per-user access.
Variables: location (eastus), db_sku, node_vm_size, high_availability (false). Outputs: kubeconfig_command,
postgres_host.
After apply¶
cd ~/.burrow/stacks/aws
eval "$(terraform output -raw kubeconfig_command)" # adds a kubectl context
kubectl --context burrowdb -n burrowdb port-forward svc/burrowdb 8090:80 & # the LB is internal
eval "$(terraform output -raw superuser_password_command)" \
| burrow login --url http://127.0.0.1:8090 --email admin@example.com --password-stdin
burrow doctor
From inside the network (a VPN or a bastion), the internal load balancer's address
(kubectl -n burrowdb get svc burrowdb) works too. Users on the internet should reach
https://<your host> through an Ingress with TLS.
The kubectl context is named after name (burrowdb) on AWS and Azure; on GCP it is the usual
gke_<project>_<region>_<name>. Only the AWS module has a superuser_password_command output; on GCP
and Azure read the superuser-password key of the burrowdb Secret in namespace burrowdb the same
way.
Put TLS in front (an Ingress with a certificate) before real traffic, and set app_url to the public
https:// URL.