Skip to content

Commit

Permalink
Remoce clonded ide2 before creating new one (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalg91 committed Dec 7, 2022
1 parent 8060f9b commit f23ef0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proxmoxtf/resource_virtual_environment_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,12 @@ func resourceVirtualEnvironmentVMCreateClone(ctx context.Context, d *schema.Reso
Media: &cdromCloudInitMedia,
},
}

ciUpdateBody := &proxmox.VirtualEnvironmentVMUpdateRequestBody{}
ciUpdateBody.Delete = append(ciUpdateBody.Delete, "ide2")
err = veClient.UpdateVM(ctx, nodeName, vmID, ciUpdateBody)
if err != nil {
return diag.FromErr(err)
}
initializationConfig, err := resourceVirtualEnvironmentVMGetCloudInitConfig(d)
if err != nil {
return diag.FromErr(err)
Expand Down

0 comments on commit f23ef0a

Please sign in to comment.