Skip to content

Commit

Permalink
Fix VM updates with an empty name
Browse files Browse the repository at this point in the history
  • Loading branch information
v12 committed Jan 16, 2021
1 parent d903ff4 commit dbaad88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion proxmoxtf/resource_virtual_environment_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit dbaad88

Please sign in to comment.