Telmate / terraform-provider-proxmox

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

Creating multiple VMs at once via a template and for_each causes error #1159

Open RaceFPV opened 1 week ago

RaceFPV commented 1 week ago

When trying to create multiple VMs at the same time cloned from a template, only one vm is created successfully while all other vm's error with "500 unable to create vm <#>: config file already exists". I can then re-run the apply and the next vm in the list will be created but again only one at a time. This behavior wasn't seen in 3.0.1-rc1 where it would create 10+ vms at the same time without issue/errors. The multiple vm's are created by looping over a for_each within the resource "proxmox_vm_qemu" block

RaceFPV commented 1 week ago

On further investigation, it appears that its trying to create all of the vm's on the iterated list with the same vm id. This may be related to 1136

Tinyblargon commented 1 week ago

@RaceFPV It is the same bug. Next release pm_parrallel will default to 1. You can set this in the provider to work around your issue.