Skip to content

Instantly share code, notes, and snippets.

@ljtill
Last active July 1, 2021 20:24
Show Gist options
  • Save ljtill/412ccb37e5511e684a0e8737ef3d9c6c to your computer and use it in GitHub Desktop.
Save ljtill/412ccb37e5511e684a0e8737ef3d9c6c to your computer and use it in GitHub Desktop.
Provides the ability to allow resource types
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"not": {
"anyOf": [
{
"contains": "Microsoft.Network/applicationGateway",
"field": "type"
},
{
"contains": "Microsoft.Network/applicationSecurityGroups",
"field": "type"
},
{
"contains": "Microsoft.Network/networkSecurityGroups",
"field": "type"
},
{
"contains": "Microsoft.Network/loadBalancers",
"field": "type"
},
{
"contains": "Microsoft.Network/locations",
"field": "type"
},
{
"contains": "Microsoft.Network/networkInterfaces",
"field": "type"
},
{
"contains": "Microsoft.Network/privateDns",
"field": "type"
},
{
"contains": "Microsoft.Network/operations",
"field": "type"
},
{
"contains": "Microsoft.Network/privateEndpoint",
"field": "type"
}
]
}
},
{
"anyOf": [
{
"contains": "Microsoft.Network/",
"field": "type"
}
]
}
]
},
"then": {
"effect": "deny"
}
},
"parameters": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment