-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
AllowedResourceTypesAndProviders_Deny.json
80 lines (80 loc) · 2.41 KB
/
AllowedResourceTypesAndProviders_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
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
80
{
"properties": {
"displayName": "Do not allow creation of resource types outside of the allowlist",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy prevents deployment of resource types outside of the explicitly allowed types, in order to maintain security in a virtual enclave. https://aka.ms/VirtualEnclaves",
"metadata": {
"version": "1.0.0",
"category": "VirtualEnclaves"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"defaultValue": "Deny",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match"
}
},
"allowedResourceProviders": {
"metadata": {
"description": "List of allowed resource providers or parent resource types as strings, such as microsoft.storage or microsoft.servicebus",
"displayName": "Allowed resource providers"
},
"defaultValue": [],
"type": "Array"
},
"allowedResourceTypes": {
"metadata": {
"description": "List of allowed resource types as strings, such as microsoft.storage/storageaccounts",
"displayName": "Allowed resource types"
},
"defaultValue": [],
"type": "Array"
}
},
"policyRule": {
"if": {
"allOf": [
{
"count": {
"value": "[parameters('allowedResourceTypes')]",
"name": "resourceType",
"where": {
"field": "type",
"equals": "[current('resourceType')]"
}
},
"equals": 0
},
{
"count": {
"value": "[parameters('allowedResourceProviders')]",
"name": "resourceProvider",
"where": {
"field": "type",
"like": "[concat(current('resourceProvider'), '/*')]"
}
},
"equals": 0
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/ead33d15-8ff9-44d8-be85-24144ecc859e",
"name": "ead33d15-8ff9-44d8-be85-24144ecc859e"
}