Hi. I'm having problems cloning with Terraform my template I did following this video: https://www.youtube.com/watch?v=MJgIm03Jxdo&ab_channel=LearnLinuxTV
The template works fine, as in Proxmox GUI I can clone as many VMs as I want and it works perfectly. However, when I try doing it with Terraform, it either doesn't have cloudinit, or the console can't connect to server. My provider is telmate and the version is 3.0.1-rc8.
I appreciate any help I could get.
Thank you,
I may even dare to say, that at first it clones correctly but then it does something that makes it not work. + When doing terraform apply it doesnt finish applying it...
The template works fine, as in Proxmox GUI I can clone as many VMs as I want and it works perfectly. However, when I try doing it with Terraform, it either doesn't have cloudinit, or the console can't connect to server. My provider is telmate and the version is 3.0.1-rc8.
I appreciate any help I could get.
Thank you,
Code:
resource "proxmox_vm_qemu" "VM" {
name = "VM"
target_node = var.proxmox_node
clone = var.templateVM
vmid = 400
full_clone = true
agent = 1
os_type = "cloud-init"
cores = 2
memory = 2048
scsihw = "virtio-scsi-single"
disk {
size = "32G"
slot = "scsi0"
storage = "secondHDD"
//discard = false
}
network {
id = 0
model = "virtio"
bridge = "vmbr0"
firewall = false
link_down = false # disables network on boot
}
ciuser = var.user
cipassword = var.password
ipconfig0 = "ip=192.168.128.10/24,gw=192.168.128.1"
sshkeys = <<EOF
${var.ssh_public_key}
EOF
}
I may even dare to say, that at first it clones correctly but then it does something that makes it not work. + When doing terraform apply it doesnt finish applying it...