Proxmox Terraform
Example terraform file
terraform { required_version = “>= 0.14” required_providers { proxmox = { source = “telmate/proxmox” } } }
provider “proxmox” { pm_tls_insecure = true pm_api_url = “https://192.168.xx.xx:8006/api2/json” pm_user = “root@pam” pm_password = “password” }
resource “proxmox_vm_qemu” “example” { count = 1 name = “example-${count.index}”
target_node = “proxmox”
clone = “debian10-cloudinit”
os_type = “cloud-init” cores = 2 agent = 1 sockets = “1” cpu = “host” memory = 1024 bootdisk = “scsi0” scsihw = “virtio-scsi-pci” }
Terraform apply running forever
Make sure add the value agent = 1
, to enable qemu agent. See more.