mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-05 05:24:01 +00:00
fix(vm): ensure startup / shutdown delay is applied when order is not configured (#479)
This commit is contained in:
parent
8d0b3ed25f
commit
2cf64b88c3
@ -1303,18 +1303,16 @@ func VM() *schema.Resource {
|
|||||||
Default: dvResourceVirtualEnvironmentVMStartupOrder,
|
Default: dvResourceVirtualEnvironmentVMStartupOrder,
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMStartupUpDelay: {
|
mkResourceVirtualEnvironmentVMStartupUpDelay: {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Description: "A non-negative number defining the delay in seconds before the next VM is started",
|
Description: "A non-negative number defining the delay in seconds before the next VM is started",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: dvResourceVirtualEnvironmentVMStartupUpDelay,
|
Default: dvResourceVirtualEnvironmentVMStartupUpDelay,
|
||||||
ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)),
|
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMStartupDownDelay: {
|
mkResourceVirtualEnvironmentVMStartupDownDelay: {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Description: "A non-negative number defining the delay in seconds before the next VM is shut down",
|
Description: "A non-negative number defining the delay in seconds before the next VM is shut down",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: dvResourceVirtualEnvironmentVMStartupDownDelay,
|
Default: dvResourceVirtualEnvironmentVMStartupDownDelay,
|
||||||
ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -3206,8 +3204,9 @@ func vmGetStartupOrder(d *schema.ResourceData) *vms.CustomStartupOrder {
|
|||||||
|
|
||||||
if startupOrder >= 0 {
|
if startupOrder >= 0 {
|
||||||
order.Order = &startupOrder
|
order.Order = &startupOrder
|
||||||
return &order
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return &order
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user