-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_linux_virtual_machine
azurerm_windows_virtual_machine
- support bypass_platform_safety_checks_on_user_schedule_enabled
and reboot_setting
#22349
Conversation
…upport `bypass_platform_safety_checks_on_user_schedule_enabled` and `reboot_setting`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 2 minor comments on the linux resource, could you port those two changes over to the windows resource as well. I'll run the tests then this should be good to go.
if v := patchSettings.AutomaticByPlatformSettings.BypassPlatformSafetyChecksOnUserSchedule; v != nil { | ||
bypassPlatformSafetyChecksOnUserScheduleEnabled = pointer.From(v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointer.From
contains nil checking so this can be condensed down to
if v := patchSettings.AutomaticByPlatformSettings.BypassPlatformSafetyChecksOnUserSchedule; v != nil { | |
bypassPlatformSafetyChecksOnUserScheduleEnabled = pointer.From(v) | |
bypassPlatformSafetyChecksOnUserScheduleEnabled = pointer.From(v) |
if v := patchSettings.AutomaticByPlatformSettings.RebootSetting; v != "" { | ||
rebootSetting = string(v) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can condense this as well
if v := patchSettings.AutomaticByPlatformSettings.RebootSetting; v != "" { | |
rebootSetting = string(v) | |
} | |
rebootSetting = string(v) |
@@ -126,6 +126,10 @@ The following arguments are supported: | |||
|
|||
* `boot_diagnostics` - (Optional) A `boot_diagnostics` block as defined below. | |||
|
|||
* `bypass_platform_safety_checks_on_user_schedule_enabled` - (Optional) Specifies whether to skip platform scheduled patch when user schedule is associated to the VM. Defaults to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `bypass_platform_safety_checks_on_user_schedule_enabled` - (Optional) Specifies whether to skip platform scheduled patch when user schedule is associated to the VM. Defaults to `false`. | |
* `bypass_platform_safety_checks_on_user_schedule_enabled` - (Optional) Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`. |
@@ -182,6 +186,10 @@ The following arguments are supported: | |||
|
|||
* `proximity_placement_group_id` - (Optional) The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. | |||
|
|||
* `reboot_setting` - (Optional) Specifies the reboot setting for platform scheduled patch. Possible values are `Always`, `IfRequired` and `Never`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `reboot_setting` - (Optional) Specifies the reboot setting for platform scheduled patch. Possible values are `Always`, `IfRequired` and `Never`. | |
* `reboot_setting` - (Optional) Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`. |
@@ -119,6 +119,10 @@ The following arguments are supported: | |||
|
|||
* `boot_diagnostics` - (Optional) A `boot_diagnostics` block as defined below. | |||
|
|||
* `bypass_platform_safety_checks_on_user_schedule_enabled` - (Optional) Specifies whether to skip platform scheduled patch when user schedule is associated to the VM. Defaults to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `bypass_platform_safety_checks_on_user_schedule_enabled` - (Optional) Specifies whether to skip platform scheduled patch when user schedule is associated to the VM. Defaults to `false`. | |
* `bypass_platform_safety_checks_on_user_schedule_enabled` - (Optional) Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`. |
@@ -177,6 +181,10 @@ The following arguments are supported: | |||
|
|||
* `proximity_placement_group_id` - (Optional) The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. | |||
|
|||
* `reboot_setting` - (Optional) Specifies the reboot setting for platform scheduled patch. Possible values are `Always`, `IfRequired` and `Never`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `reboot_setting` - (Optional) Specifies the reboot setting for platform scheduled patch. Possible values are `Always`, `IfRequired` and `Never`. | |
* `reboot_setting` - (Optional) Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`. |
@stephybun thanks for reviewing the change! I've updated the code and the doc according to your comments, please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @myc2h6o LGTM 🤖
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Close #21690
Document: https://learn.microsoft.com/azure/update-center/prerequsite-for-schedule-patching?tabs=new-prereq-rest-api%2Cauto-portal