0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-01 02:52:58 +00:00

fix(vm): ensure startup / shutdown delay is applied when order is not configured (#479)

This commit is contained in:
Pavel Boldyrev 2023-08-10 16:21:41 -04:00 committed by GitHub
parent 8d0b3ed25f
commit 2cf64b88c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1303,18 +1303,16 @@ func VM() *schema.Resource {
Default: dvResourceVirtualEnvironmentVMStartupOrder,
},
mkResourceVirtualEnvironmentVMStartupUpDelay: {
Type: schema.TypeInt,
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)),
Type: schema.TypeInt,
Description: "A non-negative number defining the delay in seconds before the next VM is started",
Optional: true,
Default: dvResourceVirtualEnvironmentVMStartupUpDelay,
},
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)),
Type: schema.TypeInt,
Description: "A non-negative number defining the delay in seconds before the next VM is shut down",
Optional: true,
Default: dvResourceVirtualEnvironmentVMStartupDownDelay,
},
},
},
@ -3206,8 +3204,9 @@ func vmGetStartupOrder(d *schema.ResourceData) *vms.CustomStartupOrder {
if startupOrder >= 0 {
order.Order = &startupOrder
return &order
}
return &order
}
return nil