Find file History
pilor Key vault vnet rule policy + clean up (#233)
* Clean up deploy to azure links, add KV vnet rule policy

* Check defaultAction in KV vnet policy
Latest commit 4e239c2 Oct 22, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md Key vault vnet rule policy + clean up (#233) Oct 22, 2018
azurepolicy.json Fix mode casing (#148) Jul 24, 2018
azurepolicy.parameters.json Remove invalid strongType Apr 18, 2018
azurepolicy.rules.json Use escaped tag name syntax for tag policies Mar 27, 2018

README.md

Audit resource groups missing tags

Audit resource groups that doesn't have particular tag

Try on Portal

Deploy to Azure

Try with PowerShell

$definition = New-AzureRmPolicyDefinition -Name "audit-resourceGroup-tags" -DisplayName "Audit resource groups missing tags" -description "Audit resource groups that doesn't have particular tag" -Policy 'https://raw.githubusercontent.com/Azure/azure-policy/master/samples/ResourceGroup/audit-resourceGroup-tags/azurepolicy.rules.json' -Parameter 'https://raw.githubusercontent.com/Azure/azure-policy/master/samples/ResourceGroup/audit-resourceGroup-tags/azurepolicy.parameters.json' -Mode All
$definition
$assignment = New-AzureRMPolicyAssignment -Name <assignmentname> -Scope <scope>  -tagName <tagName> -PolicyDefinition $definition
$assignment 

Try with CLI


az policy definition create --name 'audit-resourceGroup-tags' --display-name 'Audit resource groups missing tags' --description 'Audit resource groups that doesn't have particular tag' --rules 'https://raw.githubusercontent.com/Azure/azure-policy/master/samples/ResourceGroup/audit-resourceGroup-tags/azurepolicy.rules.json' --params 'https://raw.githubusercontent.com/Azure/azure-policy/master/samples/ResourceGroup/audit-resourceGroup-tags/azurepolicy.parameters.json' --mode All

az policy assignment create --name <assignmentname> --scope <scope> --policy "audit-resourceGroup-tags"