-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ResourceGroupAllowedLocations_Deny.json
45 lines (45 loc) · 1.24 KB
/
ResourceGroupAllowedLocations_Deny.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
{
"properties": {
"displayName": "Allowed locations for resource groups",
"policyType": "BuiltIn",
"mode": "All",
"description": "This policy enables you to restrict the locations your organization can create resource groups in. Use to enforce your geo-compliance requirements.",
"metadata": {
"version": "1.0.0",
"category": "General"
},
"version": "1.0.0",
"parameters": {
"listOfAllowedLocations": {
"type": "Array",
"metadata": {
"description": "The list of locations that resource groups can be created in.",
"strongType": "location",
"displayName": "Allowed locations"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Resources/subscriptions/resourceGroups"
},
{
"field": "location",
"notIn": "[parameters('listOfAllowedLocations')]"
}
]
},
"then": {
"effect": "deny"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988",
"name": "e765b5de-1225-4ba3-bd56-1ac6695af988"
}