0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-22 19:38:35 +00:00

fix(vm): error 'resizing of efidisks is not supported' when clonning a VM with re-defined efi_disk (#1206)

* fix(vm): compare efiType value instead of address

Signed-off-by: tyxieblub <5111464+tyxieblub@users.noreply.github.com>

* update example to reproduce the error case

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: tyxieblub <5111464+tyxieblub@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
joris 2024-04-12 05:09:56 +02:00 committed by GitHub
parent 19a13bee0a
commit 46d323d31b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -155,6 +155,12 @@ resource "proxmox_virtual_environment_vm" "example" {
serial = "my-custom-serial"
}
efi_disk {
datastore_id = local.datastore_id
file_format = "raw"
type = "4m"
}
initialization {
datastore_id = local.datastore_id
// if unspecified:

View File

@ -2233,7 +2233,7 @@ func vmCreateClone(ctx context.Context, d *schema.ResourceData, m interface{}) d
continue
}
if &efiType != currentDiskInfo.Type {
if efiType != *currentDiskInfo.Type {
return diag.Errorf(
"resizing of efidisks is not supported.",
)