Skip to content

Commit

Permalink
Fix validation and doc for vm/vmss termination_notification (#16594)
Browse files Browse the repository at this point in the history
  • Loading branch information
myc2h6o authored Apr 29, 2022
1 parent 412a4ac commit 3c45bca
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ func OrchestratedVirtualMachineScaleSetTerminationNotificationSchema() *pluginsd
"timeout": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: azValidate.ISO8601Duration,
ValidateFunc: azValidate.ISO8601DurationBetween("PT5M", "PT15M"),
Default: "PT5M",
},
},
Expand Down
4 changes: 2 additions & 2 deletions internal/services/compute/virtual_machine_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ func VirtualMachineScaleSetTerminateNotificationSchema() *pluginsdk.Schema {
"timeout": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: azValidate.ISO8601Duration,
ValidateFunc: azValidate.ISO8601DurationBetween("PT5M", "PT15M"),
Default: "PT5M",
},
},
Expand All @@ -1439,7 +1439,7 @@ func VirtualMachineScaleSetTerminationNotificationSchema() *pluginsdk.Schema {
"timeout": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: azValidate.ISO8601Duration,
ValidateFunc: azValidate.ISO8601DurationBetween("PT5M", "PT15M"),
Default: "PT5M",
},
},
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/linux_virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ A `termination_notification` block supports the following:

* `enabled` - (Required) Should the termination notification be enabled on this Virtual Machine? Defaults to `false`.

* `timeout` - (Optional) Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in ISO 8601 format.
* `timeout` - (Optional) Length of time (in minutes, between `5` and `15`) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in ISO 8601 format.

~> **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ A `public_ip_address` block supports the following:

A `termination_notification` block supports the following:

* `enabled` - (Required) Should the terminate notification be enabled on this Virtual Machine Scale Set? Possible values `true` or `false` Defaults to `false`.
* `enabled` - (Required) Should the termination notification be enabled on this Virtual Machine Scale Set? Possible values `true` or `false` Defaults to `false`.

* `timeout` - (Optional) Length of time (in minutes, between `5` and `15`) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in `ISO 8601` format. Defaults to `PT5M`.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/windows_virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ A `termination_notification` block supports the following:

* `enabled` - (Required) Should the termination notification be enabled on this Virtual Machine? Defaults to `false`.

* `timeout` - (Optional) Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in ISO 8601 format.
* `timeout` - (Optional) Length of time (in minutes, between `5` and `15`) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in ISO 8601 format.

~> **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification).

Expand Down

0 comments on commit 3c45bca

Please sign in to comment.