From 2d077c11adebd7e2b49f8840ff7b4878b410c8d1 Mon Sep 17 00:00:00 2001 From: rayan AL-anbari Date: Sun, 31 Aug 2025 14:38:31 +0300 Subject: [PATCH] Add custom tagging policy files and assignment steps --- policy/tagging-policy.json | 12 ++++++++++++ policy/tagging-rule.json | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 policy/tagging-policy.json create mode 100644 policy/tagging-rule.json 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" } +}