Skip to content

Instantly share code, notes, and snippets.

@averkinderen
Created December 6, 2017 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save averkinderen/da145b111ec02574cfd43dc3442705b8 to your computer and use it in GitHub Desktop.
Save averkinderen/da145b111ec02574cfd43dc3442705b8 to your computer and use it in GitHub Desktop.
Allow multiple name patterns
{
"properties": {
"displayName": "Match multiple name patterns.",
"description": "Allows one of multiple naming patterns for resources.",
"mode": "all",
"policyRule": {
"if": {
"allOf": [
{
"not": {
"field": "name",
"match": "contoso??????"
}
},
{
"not": {
"field": "name",
"match": "contoso-???-##"
}
}
]
},
"then": {
"effect": "deny"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment