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
Code of Conduct
Feature Description
[Problem]
The current implementation for the VM module defaults with the following extensions in the extensions block:
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
Code of Conduct