Files
hapi/infra/backend
Bobby 88235fc824 feat: Add PostgreSQL Kubernetes deployment with Kustomize
- Create infrastructure for PostgreSQL StatefulSet in Kubernetes
- Implement environment-specific configurations (staging/production)
- Add Kustomize overlays for deterministic deployments
- Document deployment process in AGENTS.md and infra/k8s/README.md
- Include Makefile and helper scripts for easy management

New directories:
- infra/k8s/base/ - Shared resources (StatefulSet, Service, PVC, Namespace)
- infra/k8s/staging/ - Staging environment overlay
- infra/k8s/production/ - Production environment overlay

Key files:
- infra/k8s/base/kustomization.yaml
- infra/k8s/staging/kustomization.yaml
- infra/k8s/production/kustomization.yaml
- infra/k8s/README.md

Resources are prefixed by environment (staging-, production-) and deployed
to the postgres namespace.
2026-11-18 15:29:00 -05:00
..

Backend configuration for HAPI Terraform

This module configures the Terraform backend to store state in Linode Object Storage.

Configuration

The backend uses S3-compatible API provided by Linode Object Storage.

terraform {
  backend "s3" {
    bucket         = "hapi-terraform-state-${var.environment}"
    key            = "hapi/terraform.tfstate"
    region         = var.linode_object_storage_cluster
    endpoint       = "${var.linode_object_storage_cluster}.linodeobjects.com"
    access_key     = var.object_storage_access_key
    secret_key     = var.object_storage_secret_key
    skip_region    = true
    skip_credentials_validation = true
    skip_metadata_api_check     = true
  }
}

Variables

Variable Description Type Default
environment Deployment environment string "staging"
linode_object_storage_cluster Object Storage cluster/region string "us-east-1"
object_storage_access_key Access key for Object Storage string -
object_storage_secret_key Secret key for Object Storage (sensitive) string -

Outputs

Output Description
backend_bucket Name of the state bucket
backend_key Path to state file within bucket
backend_region Object Storage cluster/region
backend_endpoint S3-compatible endpoint URL