Skip to content

Instantly share code, notes, and snippets.

@andrewmatveychuk
Last active May 12, 2023 13:26
Show Gist options
  • Save andrewmatveychuk/e53b43ce42a3673868b4b5149d1c92ee to your computer and use it in GitHub Desktop.
Save andrewmatveychuk/e53b43ce42a3673868b4b5149d1c92ee to your computer and use it in GitHub Desktop.
Sample Azure Policy rule to match a specific tag pattern
"policyRule": {
"if": {
"field": "[[concat('tags[', parameters('tagName'), ']')]", // For example, 'application' as the tag name
"notMatch": "??##-??????????" // To match pattern like 'AC01-FinanceApp'
},
"then": {
// Some policy effect...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment