mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02:59 +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
@ -1307,14 +1307,12 @@ func VM() *schema.Resource {
|
||||
Description: "A non-negative number defining the delay in seconds before the next VM is started",
|
||||
Optional: true,
|
||||
Default: dvResourceVirtualEnvironmentVMStartupUpDelay,
|
||||
ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)),
|
||||
},
|
||||
mkResourceVirtualEnvironmentVMStartupDownDelay: {
|
||||
Type: schema.TypeInt,
|
||||
Description: "A non-negative number defining the delay in seconds before the next VM is shut down",
|
||||
Optional: true,
|
||||
Default: dvResourceVirtualEnvironmentVMStartupDownDelay,
|
||||
ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)),
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -3206,8 +3204,9 @@ func vmGetStartupOrder(d *schema.ResourceData) *vms.CustomStartupOrder {
|
||||
|
||||
if startupOrder >= 0 {
|
||||
order.Order = &startupOrder
|
||||
return &order
|
||||
}
|
||||
|
||||
return &order
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user