Repository for Azure Resource Policy built-in definitions and samples
MIT License
1.51k
stars
1.09k
forks
source link
Audit diagnostic setting for selected resource types: false positive for `microsoft.automation/automationaccounts`, `microsoft.keyvault/vaults`, and `microsoft.network/publicipaddresses` #1370
Details of the scenario you tried and the problem that is occurring
When the Audit diagnostic setting for selected resource types is assigned in a scope that contains a resource of the type microsoft.automation/automationaccounts, microsoft.keyvault/vaults, and microsoft.network/publicipaddresses then the policy will flag these resources as Non-Complaint. The policy checks for the existence of the field Microsoft.Insights/diagnosticSettings/logs.enabled with a value of true.
However the Microsoft.Insights/diagnosticSettings resources for microsoft.automation/automationaccounts, microsoft.keyvault/vaults, and microsoft.network/publicipaddresses are different from most resource types. Below is the difference:
Details of the scenario you tried and the problem that is occurring
When the Audit diagnostic setting for selected resource types is assigned in a scope that contains a resource of the type
microsoft.automation/automationaccounts
,microsoft.keyvault/vaults
, andmicrosoft.network/publicipaddresses
then the policy will flag these resources as Non-Complaint. The policy checks for the existence of the field Microsoft.Insights/diagnosticSettings/logs.enabled with a value of true.However the
Microsoft.Insights/diagnosticSettings
resources formicrosoft.automation/automationaccounts
,microsoft.keyvault/vaults
, andmicrosoft.network/publicipaddresses
are different from most resource types. Below is the difference:Because logs contains both the
audit
andallLogs
categories andaudit
hasenabled: "false"
the policy flags this resource as Non-CompliantVerbose logs showing the problem
N/A
Suggested solution to the issue
Flag a resource as compliant if at least one
log.enabled = true
is found.If policy is Guest Configuration - details about target node
N/A