mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02:59 +00:00
* fix: Remove cloned ide2 before creating new one (#174) * add test case to `/examples` Co-authored-by: Michał Gawryś <mgawrys@netbyte.pl> Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
60c6d58d9f
commit
27665554de
@ -83,6 +83,13 @@ resource "proxmox_virtual_environment_vm" "example" {
|
||||
"echo Welcome to $(hostname)!",
|
||||
]
|
||||
}
|
||||
|
||||
initialization {
|
||||
dns {
|
||||
server = "8.8.8.8"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output "resource_proxmox_virtual_environment_vm_example_id" {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user