remove postgres servers

This commit is contained in:
2025-04-23 06:11:10 -05:00
parent a6289a9055
commit 41d2d55807

View File

@@ -1,115 +1,116 @@
resource "proxmox_vm_qemu" "haproxy" { #resource "proxmox_vm_qemu" "haproxy" {
count = local.haproxy.count # count = local.haproxy.count
ciuser = "administrator" # ciuser = "administrator"
vmid = "${local.vlan}${local.haproxy.ip[count.index]}" # vmid = "${local.vlan}${local.haproxy.ip[count.index]}"
name = local.haproxy.name[count.index] # name = local.haproxy.name[count.index]
target_node = local.haproxy.node[count.index] # target_node = local.haproxy.node[count.index]
clone = local.template # clone = local.template
tags = local.haproxy.tags # tags = local.haproxy.tags
qemu_os = "l26" # qemu_os = "l26"
full_clone = true # full_clone = true
os_type = "cloud-init" # os_type = "cloud-init"
agent = 1 # agent = 1
cores = local.haproxy.cores # cores = local.haproxy.cores
sockets = 1 # sockets = 1
cpu_type = "host" # cpu_type = "host"
memory = local.haproxy.memory # memory = local.haproxy.memory
scsihw = "virtio-scsi-pci" # scsihw = "virtio-scsi-pci"
#bootdisk = "scsi0" # #bootdisk = "scsi0"
boot = "order=virtio0" # boot = "order=virtio0"
onboot = true # onboot = true
sshkeys = local.sshkeys # sshkeys = local.sshkeys
vga { # vga {
type = "serial0" # type = "serial0"
} # }
serial { # serial {
id = 0 # id = 0
type = "socket" # type = "socket"
} # }
disks { # disks {
ide { # ide {
ide2 { # ide2 {
cloudinit { # cloudinit {
storage = local.haproxy.storage # storage = local.haproxy.storage
} # }
} # }
} # }
virtio { # virtio {
virtio0 { # virtio0 {
disk { # disk {
size = local.haproxy.drive # size = local.haproxy.drive
format = local.format # format = local.format
storage = local.haproxy.storage # storage = local.haproxy.storage
} # }
} # }
} # }
} # }
network { # network {
id = 0 # id = 0
model = "virtio" # model = "virtio"
bridge = "vmbr0" # bridge = "vmbr0"
tag = local.vlan # tag = local.vlan
} # }
#Cloud Init Settings # #Cloud Init Settings
ipconfig0 = "ip=192.168.${local.vlan}.${local.haproxy.ip[count.index]}/24,gw=192.168.${local.vlan}.1" # ipconfig0 = "ip=192.168.${local.vlan}.${local.haproxy.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
searchdomain = "durp.loc" # searchdomain = "durp.loc"
nameserver = local.dnsserver # nameserver = local.dnsserver
} #}
#
resource "proxmox_vm_qemu" "postgres" { #resource "proxmox_vm_qemu" "postgres" {
count = local.postgres.count # count = local.postgres.count
ciuser = "administrator" # ciuser = "administrator"
vmid = "${local.vlan}${local.postgres.ip[count.index]}" # vmid = "${local.vlan}${local.postgres.ip[count.index]}"
name = local.postgres.name[count.index] # name = local.postgres.name[count.index]
target_node = local.postgres.node[count.index] # target_node = local.postgres.node[count.index]
clone = local.template # clone = local.template
tags = local.postgres.tags # tags = local.postgres.tags
qemu_os = "l26" # qemu_os = "l26"
full_clone = true # full_clone = true
os_type = "cloud-init" # os_type = "cloud-init"
agent = 1 # agent = 1
cores = local.postgres.cores # cores = local.postgres.cores
sockets = 1 # sockets = 1
cpu_type = "host" # cpu_type = "host"
memory = local.postgres.memory # memory = local.postgres.memory
scsihw = "virtio-scsi-pci" # scsihw = "virtio-scsi-pci"
#bootdisk = "scsi0" # #bootdisk = "scsi0"
boot = "order=virtio0" # boot = "order=virtio0"
onboot = true # onboot = true
sshkeys = local.sshkeys # sshkeys = local.sshkeys
vga { # vga {
type = "serial0" # type = "serial0"
} # }
serial { # serial {
id = 0 # id = 0
type = "socket" # type = "socket"
} # }
disks { # disks {
ide { # ide {
ide2 { # ide2 {
cloudinit { # cloudinit {
storage = local.postgres.storage # storage = local.postgres.storage
} # }
} # }
} # }
virtio { # virtio {
virtio0 { # virtio0 {
disk { # disk {
size = local.postgres.drive # size = local.postgres.drive
format = local.format # format = local.format
storage = local.postgres.storage # storage = local.postgres.storage
} # }
} # }
} # }
} # }
network { # network {
id = 0 # id = 0
model = "virtio" # model = "virtio"
bridge = "vmbr0" # bridge = "vmbr0"
tag = local.vlan # tag = local.vlan
} # }
#Cloud Init Settings # #Cloud Init Settings
ipconfig0 = "ip=192.168.${local.vlan}.${local.postgres.ip[count.index]}/24,gw=192.168.${local.vlan}.1" # ipconfig0 = "ip=192.168.${local.vlan}.${local.postgres.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
searchdomain = "durp.loc" # searchdomain = "durp.loc"
nameserver = local.dnsserver # nameserver = local.dnsserver
} #}
#