Skip to content
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

Patch mode causing issue while execution #13

Open
Nikhleshk opened this issue Aug 4, 2022 · 0 comments
Open

Patch mode causing issue while execution #13

Nikhleshk opened this issue Aug 4, 2022 · 0 comments

Comments

@Nikhleshk
Copy link

│ Error: creating Windows Virtual Machine: (Name "win-machine" / Resource Group "tamopstf"): compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="The patchMode 'AutomaticByOS' is invalid. For patchMode 'AutomaticByOS', the property 'enableAutomaticUpdates' must be set to true." Target="windowsConfiguration.patchSettings.patchMode"

│ with module.virtual-machine-win.azurerm_windows_virtual_machine.win_vm[0],
│ on .terraform\modules\virtual-machine-win\main.tf line 272, in resource "azurerm_windows_virtual_machine" "win_vm":
│ 272: resource "azurerm_windows_virtual_machine" "win_vm" {

For working even commented out patch_mode in module but still getting same error.
For resolution added enable_automatic_updates attribute in VM tf file and have to make that value true to make the code working successfully.
enable_automatic_updates = false giving me same error.

Even enable_vm_availability_set = false is not working as expected have to comment out code in module
#availability_zone = var.public_ip_availability_zone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant