update
This commit is contained in:
parent
6ea3a36527
commit
6e2e59e3ad
1 changed files with 56 additions and 17 deletions
|
|
@ -1,18 +1,57 @@
|
||||||
module "k3s_masters" {
|
resource "proxmox_vm_qemu" "postgres" {
|
||||||
# Use 'git::' prefix and append the branch/tag/commit with '?ref='
|
count = local.postgres.count
|
||||||
source = "git::https://gitlab.durp.info/durfy/modules/terraform/proxmox-vm.git?ref=main"
|
ciuser = "administrator"
|
||||||
|
vmid = "${local.vlan}${local.postgres.ip[count.index]}"
|
||||||
# Inputs
|
name = local.postgres.name[count.index]
|
||||||
count = local.postgres.count
|
target_node = local.postgres.node[count.index]
|
||||||
vm_names = local.postgres.name
|
clone = local.template
|
||||||
target_nodes = local.postgres.node
|
tags = local.postgres.tags
|
||||||
vm_ips = local.postgres.ip
|
qemu_os = "l26"
|
||||||
vlan = local.vlan
|
full_clone = true
|
||||||
template = local.template
|
os_type = "cloud-init"
|
||||||
storage = local.postgres.storage
|
agent = 1
|
||||||
cores = local.postgres.cores
|
cores = local.postgres.cores
|
||||||
memory = local.postgres.memory
|
sockets = 1
|
||||||
sshkeys = local.sshkeys
|
cpu_type = "host"
|
||||||
dnsserver = local.dnsserver
|
memory = local.postgres.memory
|
||||||
drive_size = local.postgres.drive
|
scsihw = "virtio-scsi-pci"
|
||||||
|
#bootdisk = "scsi0"
|
||||||
|
boot = "order=virtio0"
|
||||||
|
onboot = true
|
||||||
|
sshkeys = local.sshkeys
|
||||||
|
vga {
|
||||||
|
type = "serial0"
|
||||||
|
}
|
||||||
|
serial {
|
||||||
|
id = 0
|
||||||
|
type = "socket"
|
||||||
|
}
|
||||||
|
disks {
|
||||||
|
ide {
|
||||||
|
ide2 {
|
||||||
|
cloudinit {
|
||||||
|
storage = local.postgres.storage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
virtio {
|
||||||
|
virtio0 {
|
||||||
|
disk {
|
||||||
|
size = local.postgres.drive
|
||||||
|
format = local.format
|
||||||
|
storage = local.postgres.storage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
network {
|
||||||
|
id = 0
|
||||||
|
model = "virtio"
|
||||||
|
bridge = "vmbr0"
|
||||||
|
tag = local.vlan
|
||||||
|
}
|
||||||
|
#Cloud Init Settings
|
||||||
|
ipconfig0 = "ip=192.168.${local.vlan}.${local.postgres.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
|
||||||
|
searchdomain = "durp.loc"
|
||||||
|
nameserver = local.dnsserver
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue