-
Notifications
You must be signed in to change notification settings - Fork 1
/
MandatoryTaggingOnResources-FreeformValues.json
79 lines (79 loc) · 2.31 KB
/
MandatoryTaggingOnResources-FreeformValues.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"Properties":{
"displayName": "Enforce mandatory tagging on resources - freeform",
"policyType": "Custom",
"mode": "Indexed",
"description": "Enforces Mandatory Tagging on Resources. Does not apply to Resource Groups."
},
"policyRule": {
"if": {
"anyof":[
{
"field": "[concat('tags[', parameters('tag1Name'), ']')]",
"exists": "false"
},
{
"field": "[concat('tags[', parameters('tag2Name'), ']')]",
"exists": "false"
},
{
"field": "[concat('tags[', parameters('tag3Name'), ']')]",
"exists": "false"
},
{
"field": "[concat('tags[', parameters('tag4Name'), ']')]",
"exists": "false"
},
{
"field": "[concat('tags[', parameters('tag5Name'), ']')]",
"exists": "false"
}
]
},
"then": {
"effect": "deny"
}
},
"parameters": {
"tag1Name": {
"type": "String",
"metadata": {
"displayName": "Tag 1 Name",
"description": "Name of the tag, such as 'CostCenter'"
},
"defaultValue": "CostCenter"
},
"tag2Name": {
"type": "String",
"metadata": {
"displayName": "Tag 2 Name",
"description": "Name of the tag, such as 'ApplicationID'"
},
"defaultValue": "AppID"
},
"tag3Name": {
"type": "String",
"metadata": {
"displayName": "Tag 3 Name",
"description": "Name of the tag, such as 'BusinessOwner'"
},
"defaultValue": "BusinessOwner"
},
"tag4Name": {
"type": "String",
"metadata": {
"displayName": "Tag 4 Name",
"description": "Name of the tag, such as 'ApplicationOwner'"
},
"defaultValue": "AppOwner"
},
"tag5Name": {
"type": "String",
"metadata": {
"displayName": "Tag 5 Name",
"description": "Name of the tag, such as 'MaintenanceWindow'"
},
"defaultValue": "MaintenanceWindow"
}
}
}