-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ListAllowedSkuNames.json
113 lines (113 loc) · 3.58 KB
/
ListAllowedSkuNames.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"properties": {
"displayName": "Lab Services should restrict allowed virtual machine SKU sizes",
"description": "This policy enables you to restrict certain Compute VM SKUs for labs managed through Lab Services. This will restrict certain virtual machine sizes.",
"mode": "Indexed",
"policyType": "BuiltIn",
"metadata": {
"version": "1.1.0",
"category": "Lab Services"
},
"version": "1.1.0",
"parameters": {
"allowedSkus": {
"type": "Array",
"metadata": {
"displayName": "Allowed SKU names",
"description": "Select allowed SKU names from list",
"portalReview": true
},
"defaultValue": [
"Standard_Fsv2_2_4GB_64_S_SSD",
"Standard_Fsv2_2_4GB_128_S_SSD",
"Classic_Fsv2_2_4GB_128_S_SSD",
"Classic_Fsv2_4_8GB_128_S_SSD",
"Classic_Fsv2_8_16GB_128_S_SSD",
"Standard_Dsv4_2_8GB_128_S_SSD",
"Standard_Dsv4_4_16GB_128_S_SSD",
"Standard_Dsv4_4_16GB_128_P_SSD",
"Standard_Dsv4_8_32GB_128_S_SSD",
"Standard_Dsv4_8_32GB_128_P_SSD",
"Classic_Dsv4_4_16GB_128_P_SSD",
"Classic_Dsv4_8_32GB_128_P_SSD",
"Classic_NVv4_8_28GB_128_S_SSD",
"Classic_NVv4_16_56GB_128_S_SSD",
"Standard_Esv4_4_32GB_128_S_SSD",
"Standard_Esv4_4_32GB_128_P_SSD"
],
"allowedValues": [
"Standard_Fsv2_2_4GB_64_S_SSD",
"Standard_Fsv2_2_4GB_128_S_SSD",
"Classic_Fsv2_2_4GB_128_S_SSD",
"Basic",
"Classic_Fsv2_4_8GB_128_S_SSD",
"Standard",
"Classic_Fsv2_8_16GB_128_S_SSD",
"Large",
"Standard_Dsv4_2_8GB_128_S_SSD",
"Standard_Dsv4_4_16GB_128_S_SSD",
"Standard_Dsv4_4_16GB_128_P_SSD",
"Standard_Dsv4_8_32GB_128_S_SSD",
"Standard_Dsv4_8_32GB_128_P_SSD",
"Classic_Dsv4_4_16GB_128_P_SSD",
"Virtualization",
"Classic_Dsv4_8_32GB_128_P_SSD",
"Performance",
"Classic_NVv4_8_28GB_128_S_SSD",
"SmallGPUVisualization",
"Classic_NVv4_16_56GB_128_S_SSD",
"MediumGPUVisualization",
"Standard_Esv4_4_32GB_128_S_SSD",
"Standard_Esv4_4_32GB_128_P_SSD"
]
},
"excludeLabPlanId": {
"type": "String",
"metadata": {
"displayName": "Lab Plan Id to exclude",
"description": "Optionally enter the lab Plan Id to exclude for this policy."
},
"defaultValue": ""
},
"effect": {
"type": "String",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.LabServices/labs"
},
{
"field": "Microsoft.LabServices/labs/labPlanId",
"notEquals": "[parameters('excludeLabPlanId')]"
},
{
"field": "Microsoft.LabServices/labs/virtualMachineProfile.sku.name",
"notIn": "[parameters('allowedSkus')]"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.1.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/3e13d504-9083-4912-b935-39a085db2249",
"name": "3e13d504-9083-4912-b935-39a085db2249"
}