Telmate / terraform-provider-proxmox

Terraform provider plugin for proxmox
MIT License
2.21k stars 535 forks source link

Unable to specify an ISO file in proper format using 3.0.1-rc4 #1111

Open captain118 opened 2 months ago

captain118 commented 2 months ago

With the config listed below I'm able to create an cdrom using config: iso = "Windows_Server_2022_Eval.iso" however the iso is not mounted. Documentation says it should be in format iso = "[local]:iso/Windows_Server_2022_Eval.iso" however this format throws the errors: Error: error creating VM: 400 Parameter verification failed., error status: {"data":null,"errors":{"ide2":"invalid format - format error\nide2.file: invalid format - unable to parse volume ID '[local]:iso/Windows_Server_2022_Eval.iso'\n\n"}}

resource "proxmox_vm_qemu" "wef" {
name        = "wef"
target_node = "pve03"
tags        = "test"
vmid        = "501"
disks {
 ide {
  ide2 {
   cdrom {
   iso = "Windows_Server_2022_Eval.iso"
  }
 }
}
 virtio {
  virtio0 {
   disk {
    storage = "local-lvm"
    size = "40G"
   }
  }
 }
}
captain118 commented 2 months ago

It looks like the format is iso = "local:iso/Windows_Server_2022_Eval.iso" I was able to find the example in the unit test go file. I dont know if you want to catch 'iso = "Windows_Server_2022_Eval.iso"' as invalid or not and I dont know if you want to update the documentation to remove the brackets.

Tinyblargon commented 2 months ago

@captain118 Thanks for reporting this.

Would probably be best if the iso part is optional. As it's implied by the field name.