terraform { required_providers { proxmox = { source = "bpg/proxmox" version = "0.85.1" } } } resource "proxmox_virtual_environment_vm" "controlplane" { name = format("k8s-wheatley-%s", var.controlplane.node_name) node_name = "pve01" tags = ["k8s-wheatley,controlplane"] bios = "ovmf" on_boot = true machine = "q35" stop_on_destroy = true operating_system { type = "l26" } agent { enabled = true } cpu { cores = var.controlplane.cpu sockets = 1 type = "host" } memory { dedicated = var.controlplane.memory * 1024 } disk { datastore_id = var.controlplane.storagepool interface = "virtio0" size = var.controlplane.disk * 1024 file_format = "raw" } initialization { datastore_id = var.controlplane.storagepool ip_config { ipv4 { address = var.controlplane.node_ipv4_address gateway = var.controlplane.ipv4_gateway } } dns { servers = ["10.13.37.2"] } } network_device { bridge = "vmbr1" mac_address = var.controlplane.mac_address } }