diff --git a/policy/tagging-policy.json b/policy/tagging-policy.json new file mode 100644 index 0000000..f5fe2b8 --- /dev/null +++ b/policy/tagging-policy.json @@ -0,0 +1,12 @@ +{ + "properties": { + "displayName": "Require resource tags", + "policyType": "Custom", + "mode": "All", + "description": "Deny creation of resources without tags", + "policyRule": { + "if": { "field": "tags", "exists": "false" }, + "then": { "effect": "deny" } + } + } +} diff --git a/policy/tagging-rule.json b/policy/tagging-rule.json new file mode 100644 index 0000000..873dff6 --- /dev/null +++ b/policy/tagging-rule.json @@ -0,0 +1,4 @@ +{ + "if": { "field": "tags", "exists": "false" }, + "then": { "effect": "deny" } +}