# Data Tier (3000-3999) # # Enterprise HA data services with automatic failover. # All VMs communicate via Nebula overlay (10.10.10.x) for migration-ready architecture. # # PostgreSQL Cluster (Patroni + etcd): # 3000 postgres-01 10.10.10.30 - Patroni node (primary/replica elected dynamically) # 3001 postgres-02 10.10.10.31 - Patroni node # 3002 postgres-03 10.10.10.32 - Patroni node # # Valkey Sentinel (1 master + 2 replicas, Sentinel on each): # 3003 valkey-01 10.10.10.33 - Master + Sentinel # 3004 valkey-02 10.10.10.34 - Replica + Sentinel # 3005 valkey-03 10.10.10.35 - Replica + Sentinel # # Garage S3 Cluster: # 3009 garage-01 10.10.10.39 - S3-compatible storage node # 3010 garage-02 10.10.10.40 - S3-compatible storage node # 3011 garage-03 10.10.10.41 - S3-compatible storage node # ============================================================================= # PostgreSQL HA Cluster (3 nodes) # ============================================================================= module "postgres-01" { source = "./modules/vm" name = "postgres-01" vmid = 3000 node_name = var.proxmox_node bridge_ip = "192.168.100.30" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 4096 disk_size = 100 username = var.username password = var.password ssh_key_path = var.ssh_key_path } module "postgres-02" { source = "./modules/vm" name = "postgres-02" vmid = 3001 node_name = var.proxmox_node bridge_ip = "192.168.100.31" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 4096 disk_size = 100 username = var.username password = var.password ssh_key_path = var.ssh_key_path } module "postgres-03" { source = "./modules/vm" name = "postgres-03" vmid = 3002 node_name = var.proxmox_node bridge_ip = "192.168.100.32" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 4096 disk_size = 100 username = var.username password = var.password ssh_key_path = var.ssh_key_path } # ============================================================================= # Valkey Sentinel (3 nodes: 1 master + 2 replicas + Sentinel on each) # ============================================================================= module "valkey-01" { source = "./modules/vm" name = "valkey-01" vmid = 3003 node_name = var.proxmox_node bridge_ip = "192.168.100.33" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 2048 disk_size = 50 username = var.username password = var.password ssh_key_path = var.ssh_key_path } module "valkey-02" { source = "./modules/vm" name = "valkey-02" vmid = 3004 node_name = var.proxmox_node bridge_ip = "192.168.100.34" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 2048 disk_size = 50 username = var.username password = var.password ssh_key_path = var.ssh_key_path } module "valkey-03" { source = "./modules/vm" name = "valkey-03" vmid = 3005 node_name = var.proxmox_node bridge_ip = "192.168.100.35" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 2048 disk_size = 50 username = var.username password = var.password ssh_key_path = var.ssh_key_path } # ============================================================================= # Garage S3 Cluster (3 nodes) # ============================================================================= module "garage-01" { source = "./modules/vm" name = "garage-01" vmid = 3009 node_name = var.proxmox_node bridge_ip = "192.168.100.39" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 2048 disk_size = 200 username = var.username password = var.password ssh_key_path = var.ssh_key_path } module "garage-02" { source = "./modules/vm" name = "garage-02" vmid = 3010 node_name = var.proxmox_node bridge_ip = "192.168.100.40" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 2048 disk_size = 200 username = var.username password = var.password ssh_key_path = var.ssh_key_path } module "garage-03" { source = "./modules/vm" name = "garage-03" vmid = 3011 node_name = var.proxmox_node bridge_ip = "192.168.100.41" gateway = var.gateway datastore_id = var.datastore_id clone_vmid = var.template_vmid cores = 2 memory = 2048 disk_size = 200 username = var.username password = var.password ssh_key_path = var.ssh_key_path }