Last active
May 12, 2023 13:26
-
-
Save andrewmatveychuk/e53b43ce42a3673868b4b5149d1c92ee to your computer and use it in GitHub Desktop.
Sample Azure Policy rule to match a specific tag pattern
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
"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