Created
February 25, 2021 15:31
-
-
Save matt-FFFFFF/3e64814526108f1fa6f06844530c07bd to your computer and use it in GitHub Desktop.
Azure policy to disallow specific LA solutions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"properties": { | |
"displayName": "Disallowed Log Analytics solutions", | |
"policyType": "Custom", | |
"mode": "All", | |
"description": "This policy enables you to specify the resource types that your organization cannot deploy.", | |
"metadata": { | |
"category": "General", | |
}, | |
"parameters": { | |
"solutionName": { | |
"type": "String", | |
"metadata": { | |
"displayName": "Log Analytics solution name to restrict, not including GUID suffix", | |
"description": "Log Analytics solution name to restrict, not including GUID suffix" | |
}, | |
"defaultValue": "Security" | |
} | |
}, | |
"policyRule": { | |
"if": { | |
"allOf": [ | |
{ | |
"field": "type", | |
"equals": "Microsoft.OperationsManagement/solutions" | |
}, | |
{ | |
"field": "name", | |
"like": "[concat(parameters('solutionName'),'(*)')]" | |
} | |
] | |
}, | |
"then": { | |
"effect": "Deny" | |
} | |
} | |
}, | |
"id": "/providers/Microsoft.Management/managementGroups/crs/providers/Microsoft.Authorization/policyDefinitions/6f6bc54d-fa13-4f79-a30f-d35954a6e045", | |
"type": "Microsoft.Authorization/policyDefinitions", | |
"name": "6f6bc54d-fa13-4f79-a30f-d35954a6e045" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment