-
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
Update azurerm_windows_virtual_machine
- Support patch_mode
#9258
Update azurerm_windows_virtual_machine
- Support patch_mode
#9258
Conversation
83184ed
to
f479d4d
Compare
New tests passed:
|
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 @ArcturusZhang - overall this looks good but i've left some comments inline that should be addressed
@@ -141,6 +141,8 @@ The following arguments are supported: | |||
|
|||
-> **NOTE:** This can only be configured when `priority` is set to `Spot`. | |||
|
|||
* `patch_mode` - (Optional) Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. |
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.
Could we include a note that this is a preview feature and the command to enable it?
TestAccWindowsVirtualMachine_otherPatchModeUpdate: testing.go:684: Step 2 error: errors during apply:
Error: updating Windows Virtual Machine "acctestvmlv1eo" (Resource Group "acctestRG-201114233915712563"): compute.VirtualMachinesClient#Update: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="The property 'windowsConfiguration.patchSettings.patchMode' is not valid because the 'Microsoft.Compute/InGuestAutoPatchVMPreview' feature is not enabled for this subscription." Target="windowsConfiguration.patchSettings.patchMode"
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.
Oh...yeah I will update the doc to include the enabling process for this. Thanks
Hi @katbyte I have add a comment in the schema and a NOTE in the doc on how to enable this preview feature.
|
@ArcturusZhang is this also applicable for Linux VM's? |
Well, no, this is only applicable for windows operating systems |
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 @ArcturusZhang - LGTM 👍
This has been released in version 2.37.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.37.0"
}
# ... other configuration ... |
This feature is still in preview, so it failed on every subscription which did not enable it explicity. compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="The property 'windowsConfiguration.patchSettings.patchMode' is not valid because the 'Microsoft.Compute/InGuestAutoPatchVMPreview' feature is not enabled for this subscription." Target="windowsConfiguration.patchSettings.patchMode" |
@ArcturusZhang based on the comment above, would you mind sending a PR to conditionally set this functionality? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
No description provided.