Skip to content

Patch mode causing issue while execution #13

@Nikhleshk

Description

@Nikhleshk

│ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions