feat: add Hetzner-hosted todo application stack

Implement the server-rendered Go todo application with PostgreSQL persistence, Tailwind styling, health checks, and test coverage.

Provision production and staging infrastructure with OpenTofu, including private networking, static IPs, Object Storage backups, and load balancing.

Configure Rocky Linux hosts with Ansible, rootless Podman, PostgreSQL, WAL-G backup automation, staging restores, and generated inventory.
This commit is contained in:
cole-maxwell1
2026-08-06 21:34:56 -05:00
commit 1382c42803
68 changed files with 2380 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
resource "hcloud_primary_ip" "ipv4" {
name = "${var.name}-ipv4"
type = "ipv4"
auto_delete = false
location = var.location
}
resource "hcloud_primary_ip" "ipv6" {
name = "${var.name}-ipv6"
type = "ipv6"
auto_delete = false
location = var.location
}
resource "hcloud_server" "this" {
name = var.name
image = "rocky-10"
server_type = var.server_type
location = var.location
ssh_keys = var.ssh_key_ids
firewall_ids = var.firewall_ids
labels = {
environment = var.environment
application = "todo"
}
public_net {
ipv4 = hcloud_primary_ip.ipv4.id
ipv4_enabled = true
ipv6 = hcloud_primary_ip.ipv6.id
ipv6_enabled = true
}
}
resource "hcloud_server_network" "this" {
server_id = hcloud_server.this.id
network_id = var.network_id
ip = var.private_ip
}
+5
View File
@@ -0,0 +1,5 @@
output "server_id" { value = hcloud_server.this.id }
output "name" { value = hcloud_server.this.name }
output "private_ip" { value = hcloud_server_network.this.ip }
output "ipv4" { value = hcloud_primary_ip.ipv4.ip_address }
output "ipv6" { value = hcloud_primary_ip.ipv6.ip_address }
+8
View File
@@ -0,0 +1,8 @@
variable "name" { type = string }
variable "server_type" { type = string }
variable "location" { type = string }
variable "ssh_key_ids" { type = list(number) }
variable "firewall_ids" { type = list(number) }
variable "network_id" { type = number }
variable "private_ip" { type = string }
variable "environment" { type = string }
+8
View File
@@ -0,0 +1,8 @@
terraform {
required_providers {
hcloud = {
source = "hetznercloud/hcloud"
version = "~> 1.52"
}
}
}