Open maksimsamt opened 1 month ago
@maksimsamt This is an issue with a lot more things. Basically, the provider treats lots of things like lists, but proxmox has a dedicated slot for each adapter. So we can't convert between them neatly. This will get rewritten at some point.
@Tinyblargon, So there is currently no way to handle removing additional network devices through the provider, just manually in the GUI until this is rewritten and fixed in the provider?
@maksimsamt you are correct.
@maksimsamt Telmate/proxmox-api-go#341
Great! @Tinyblargon , Maybe it makes sense to make the same scheme as for disks? For example:
...
resource "proxmox_vm_qemu" "cloud_vm_from_packer_template" {
...
networks = {
network0 = {
model = "virtio"
bridge = "vmbr0"
tag = 1110
firewall = false
}
network1 = {
model = "virtio"
bridge = "vmbr1"
tag = 1111
firewall = false
}
}
...
}
...
Probably gonna do both approaches from the start.
System details:
Creating new resources works as expected, two network devices are correctly created. Initial config (network snippet):
Decide to remove the second net1 network device, so there is only one network block in the config:
In
terraform apply
output all looks fine, the second network block should be removed and result shows asApply complete! Resources: 0 added, 1 changed, 0 destroyed.
:But as a result, the second network device net1 still exists in the PVE virtual machine.
When I try to run
terraform apply
again, it tries to remove this network device again and again with no success.This network device can only be removed through the Proxmox GUI.
Most likely, the same behavior will happen with the third, fourth, etc. network devices.