Files
cole-maxwell1 1382c42803 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.
2026-08-06 21:34:56 -05:00

40 lines
896 B
Terraform

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
}