Skip to content

[AVM Module Issue]: Add Support for VM Patch Assessment ModeΒ #75

@JonAtWork7

Description

@JonAtWork7

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Feature Request

(Optional) Module Version

2.0

(Optional) Correlation Id

No response

Description

Description:

Currently, the AVM module for Azure Stack HCI Virtual Machine Instance does not expose input variables to allow users to specify patchMode and assessmentMode for Linux and Windows patch settings. These settings are important for managing OS patching behavior and compliance assessment within VMs.

Proposed Enhancement:

Add new module input variables for:

  • linux_patch_mode
  • linux_patch_assessment_mode
  • windows_patch_mode
  • windows_patch_assessment_mode

Wire these variables into the resource definition for both linuxConfiguration.patchSettings and windowsConfiguration.patchSettings in the azapi_resource "hybrid_compute_machine" resource.

Update documentation and example usage to demonstrate how users can configure these settings when deploying VMs.

  • Example Usage:
module "virtual_machine" {
  # ... other arguments ...
  linux_patch_mode             = "AutomaticByPlatform"
  linux_patch_assessment_mode  = "ImageDefault"
  windows_patch_mode           = "AutomaticByPlatform"
  windows_patch_assessment_mode = "ImageDefault"
}

Benefits:

  • Enables users to fully manage and automate patching and assessment compliance for both Linux and Windows VMs.
  • Supports a broader range of customer scenarios and compliance requirements.

References:

Azure Patch and Assessment Policy documentation
Current main.tf reference

Additional context:
The current module implementation sets assessmentMode and patchMode to null for both Linux and Windows. Exposing these as configurable options would allow the module to be more flexible and production-ready.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions