mirror of
https://dev.azure.com/effectory/Survey%20Software/_git/Cloud%20Engineering
synced 2026-02-27 18:52:18 +01:00
37 lines
1.0 KiB
JSON
37 lines
1.0 KiB
JSON
{
|
|
"properties": {
|
|
"displayName": "Must have tag",
|
|
"policyType": "Custom",
|
|
"mode": "All",
|
|
"metadata": {
|
|
"category": "Effectory Custom Policies"
|
|
},
|
|
"parameters": {
|
|
"tagName": {
|
|
"type": "String",
|
|
"metadata": {
|
|
"displayName": "tagName",
|
|
"description": "Tag name"
|
|
}
|
|
},
|
|
"allowedTags": {
|
|
"type": "Array",
|
|
"metadata": {
|
|
"displayName": "Allowed tags",
|
|
"description": "The list of allowed tags for resources."
|
|
}
|
|
}
|
|
},
|
|
"policyRule": {
|
|
"if": {
|
|
"not": {
|
|
"field": "[concat('tags[', parameters('tagName'), ']')]",
|
|
"in": "[parameters('allowedTags')]"
|
|
}
|
|
},
|
|
"then": {
|
|
"effect": "audit"
|
|
}
|
|
}
|
|
}
|
|
} |