diff --git a/proxmox.tf b/proxmox.tf index e38fb53..569b7fe 100644 --- a/proxmox.tf +++ b/proxmox.tf @@ -149,6 +149,12 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" { node_name = each.value.node_name vm_id = each.value.vm_id + started = false + tags = ["opentofu", "kubernetes", "fedora"] + machine = "q35" + bios = "seabios" + description = "kubernetes VM Template created via iac" + cpu { cores = each.value.cores } @@ -163,9 +169,6 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" { interface = "scsi1" } - clone { - vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id - } initialization { dns { @@ -186,10 +189,17 @@ initialization { user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id } - customization { - cicustom = "user=local-snippets:snippets/cloud-init-iac-k8s-${each.key}.yaml" + disk { + datastore_id = "local-lvm" + file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id + interface = "scsi0" + file_format = "qcow2" } + # Configuração da interface de rede + network_device { + bridge = "vmbr0" + } agent { enabled = true }