mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-23 03:48:35 +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:
parent
dc73e0ba04
commit
a57bd7e14c
@ -263,7 +263,7 @@ const (
|
|||||||
mkTemplate = "template"
|
mkTemplate = "template"
|
||||||
mkTimeoutClone = "timeout_clone"
|
mkTimeoutClone = "timeout_clone"
|
||||||
mkTimeoutCreate = "timeout_create"
|
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"
|
mkTimeoutReboot = "timeout_reboot"
|
||||||
mkTimeoutShutdownVM = "timeout_shutdown_vm"
|
mkTimeoutShutdownVM = "timeout_shutdown_vm"
|
||||||
mkTimeoutStartVM = "timeout_start_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 {
|
func vmCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
|
||||||
clone := d.Get(mkClone).([]interface{})
|
clone := d.Get(mkClone).([]interface{})
|
||||||
|
|
||||||
|
// reset the default timeout for the create operation
|
||||||
|
ctx = context.WithoutCancel(ctx)
|
||||||
|
|
||||||
if len(clone) > 0 {
|
if len(clone) > 0 {
|
||||||
return vmCreateClone(ctx, d, m)
|
return vmCreateClone(ctx, d, m)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user