Skip to content

[Feature Request]: Adjustment in the default extensions in the VM module #91

Description

@Wojciech-Rozanski-CDT

Feature Description

[Problem]
The current implementation for the VM module defaults with the following extensions in the extensions block:

[
  "NetworkWatcherAgent",
  "AzureMonitorAgent",
  "AzurePolicy",
  "AntiMalware"
]

However it seems Microsoft changed the extension naming. The AzurePolicy is now "divided" into two extensions:
AzurePolicyforWindows
AzurePolicyforLinux

Although technically the extension, the problem is when checking against the compliance with Azure Policy. As an example, there is a built-in policy initiative called Deploy prerequisites to enable Guest Configuration policies on virtual machines. Inside this initiative there are two policies, which deploy that extension. The logic in those policies checks for:

"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "AzurePolicyforWindows",

or

"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "AzurePolicyforLinux",

As a result, even though the correct extension is installed, the VMs are flagged as non-compliant because it's installed with a wrong name.

[Recommendation]
Easy fix: remove the AzurePolicy from the default. The extension is not critical and can be installed via different means.
Perfect fix: implement a logic that will install either AzurePolicyforWindows or AzurePolicyforLinux based on the OS type.

Use Case

Eliminating the possibility of non-compliance when deploying certain Azure Policies.

Additional Information

No response

Privacy Statement

  • I agree

Code of Conduct

  • I agree to follow this repository's Code of Conduct

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions