Hi! I'm still learning ProxmoxVE, and also Terraform. I've created a VM Template "KubernetesNodeTemplate" following the instructions here: https://ochoaprojects.github.io/posts/DeployingVMsWithTerraformInProxMox/. The plan keeps showing this, and I can even clone the Template, so I'm not sure what's failing here. The logs aren't showing anything definitive. Previously, I had to fix an API Token issue, but that issue went away...
How can I list the Templates available using the "qm" command??
Provider Info:
var.template_name does equal "KubernetesNodeTemplate" and the Proxmox console shows that value, as VM 9000, with an icon that looks like the VM icon, with a piece of paper next to it.
Eror:
How can I best troubleshoot this?
Thanks!
How can I list the Templates available using the "qm" command??
Provider Info:
Code:
#Configure ProxMox API user/permissions and API url
provider "proxmox" {
pm_api_url = "https://ip_address:8006/api2/json"
pm_api_token_id = "terraform-prov@pve!terraform"
pm_api_token_secret = "psst"
pm_tls_insecure = true
pm_log_enable = true
pm_log_file = "terraform-plugin-proxmox-vm.log"
# pm_debug = true
pm_log_levels = {
_default = "debug"
_capturelog = ""
}
}
#Configure Proxmox Resources Here
resource "proxmox_vm_qemu" "Kubernetes-Node" {
count = 1
name = "Kubernetes-Node-${count.index + 1}"
target_node = var.proxmox_host
clone = var.template_name
#Basic VM settings here
agent = 1 # QEMU Guest Agent, 1 means installing the guest agent on this VM is set to True
os_type = "cloud-init"
cores = 2
sockets = 1
cpu = "host"
memory = 2048
scsihw = "virtio-scsi-pci"
bootdisk = "scsi0"
var.template_name does equal "KubernetesNodeTemplate" and the Proxmox console shows that value, as VM 9000, with an icon that looks like the VM icon, with a piece of paper next to it.
Eror:
Code:
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
proxmox_vm_qemu.Kubernetes-Node[0]: Creating...
╷
│ Error: Vm 'KubernetesNodeTemplate' not found
│
│ with proxmox_vm_qemu.Kubernetes-Node[0],
│ on main.tf line 25, in resource "proxmox_vm_qemu" "Kubernetes-Node":
│ 25: resource "proxmox_vm_qemu" "Kubernetes-Node" {
│
╵
How can I best troubleshoot this?
Thanks!