From dbaad88ea656c5353827bbba1356606c3a51370d Mon Sep 17 00:00:00 2001 From: Nikita Khomyakov Date: Sat, 16 Jan 2021 00:17:15 +0000 Subject: [PATCH] Fix VM updates with an empty name --- proxmoxtf/resource_virtual_environment_vm.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proxmoxtf/resource_virtual_environment_vm.go b/proxmoxtf/resource_virtual_environment_vm.go index a039a18..02fb54b 100644 --- a/proxmoxtf/resource_virtual_environment_vm.go +++ b/proxmoxtf/resource_virtual_environment_vm.go @@ -3017,7 +3017,11 @@ func resourceVirtualEnvironmentVMUpdate(d *schema.ResourceData, m interface{}) e } name := d.Get(mkResourceVirtualEnvironmentVMName).(string) - updateBody.Name = &name + if name == "" { + delete = append(delete, "name") + } else { + updateBody.Name = &name + } if d.HasChange(mkResourceVirtualEnvironmentVMTabletDevice) { tabletDevice := proxmox.CustomBool(d.Get(mkResourceVirtualEnvironmentVMTabletDevice).(bool))