0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 02:31:10 +00:00

fix(vm): timeout_create / timeout_clone does not always apply (#1671)

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
Pavel Boldyrev 2024-12-06 21:35:42 -05:00 committed by GitHub
parent dc73e0ba04
commit a57bd7e14c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -263,7 +263,7 @@ const (
mkTemplate = "template"
mkTimeoutClone = "timeout_clone"
mkTimeoutCreate = "timeout_create"
mkTimeoutMigrate = "timeout_migrate" // this is essentially an "timeout_update", needs to be refactored
mkTimeoutMigrate = "timeout_migrate" // this is essentially a "timeout_update", needs to be refactored
mkTimeoutReboot = "timeout_reboot"
mkTimeoutShutdownVM = "timeout_shutdown_vm"
mkTimeoutStartVM = "timeout_start_vm"
@ -1567,6 +1567,9 @@ func VM() *schema.Resource {
func vmCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
clone := d.Get(mkClone).([]interface{})
// reset the default timeout for the create operation
ctx = context.WithoutCancel(ctx)
if len(clone) > 0 {
return vmCreateClone(ctx, d, m)
}