Enterprise-Scale
Enterprise-Scale copied to clipboard
Feature Request - Audit for mandatory tags on resources should have excludeResourceTypes & excludeResourcegroupPattern
The Policy Audit for mandatory tags on resources should have exclude ResourceTypes Parameter, because some Resources could not be tagged for example "microsoft.advisor/recommendations" which also apears in the list
In the same step we could also add ResourceGroupFilter
Parameter
"excludedResourceTypes": {
"type": "Array",
"metadata": {
"displayName": "Excluded Resource Types",
"description": "Exclude certain resource types from this policy, if all resourceTypes are selected by using an empty resourceTypeList",
"strongType": "ResourceType"
},
"defaultValue": []
},
"excludedResourceGroupPatterns": {
"type": "Array",
"metadata": {
"displayName": "Excluded Resource Groups; wild card patterns are supported. Example: 'rg-*, rg-abc-*'",
"description": "This array contains all excluded RGs from this policy"
},
"defaultValue": []
}
add to if-condition
{
"field": "type",
"notIn": "[parameters('excludedResourceTypes')]"
},
"count": {
"value": "[parameters('excludedResourceGroupPatterns')]",
"name": "excludedRG",
"where": {
"value": "[resourceGroup().name]",
"like": "[current('excludedRG')]"
}
},
"equals": 0
@timmoh thanks for requesting. Fair request, we will add to the backlog and try get it in for the next refresh. Thank you for providing all that detail.
Do you need this for both policies (resources and resourceGroups)?