-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateUiDefinition.json
345 lines (345 loc) · 13.4 KB
/
createUiDefinition.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"config": {
"isWizard": false,
"basics": {
"description": "Customized description with **markdown**, see [more](https://www.microsoft.com).",
"subscription": {
"constraints": {
"validations": [
{
"isValid": "[not(contains(subscription().displayName, 'Test'))]",
"message": "Can't use test subscription."
},
{
"permission": "Microsoft.Compute/virtualmachines/write",
"message": "Must have write permission for the virtual machine."
},
{
"permission": "Microsoft.Compute/virtualMachines/extensions/write",
"message": "Must have write permission for the extension."
}
]
},
"resourceProviders": [
"Microsoft.Compute"
]
},
"resourceGroup": {
"constraints": {
"validations": [
{
"isValid": "[not(contains(resourceGroup().name, 'test'))]",
"message": "Resource group name can't contain 'test'."
}
]
},
"allowExisting": true
},
"location": {
"label": "Custom label for location",
"toolTip": "provide a useful tooltip",
"resourceTypes": [
"Microsoft.Compute/virtualMachines"
],
"allowedValues": [
"eastus",
"westus2"
],
"visible": true
}
}
},
"basics": [
{
"name": "adminPassword",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Admin Password",
"confirmPassword": "Confirm Admin Password"
},
"subLabel": {
"preValidation": "",
"postValidation": "Done"
},
"toolTip": "Password for the root/admin account on deployed virtual machine(s).",
"constraints": {
"required": true,
"regex": "^((?=.*[a-z])(?=.*[A-Z])(?=.*\\d)|(?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9])|(?=.*[a-z])(?=.*\\d)(?=.*[^A-Za-z0-9])|(?=.*[A-Z])(?=.*\\d)(?=.*[^A-Za-z0-9]))([A-Za-z\\d\\W_]|\\.(?!@)){6,72}$",
"validationMessage": "Password must be between 6-72 characters long and contain at least 3 of the following: uppercase characters, lowercase characters, numeric digits, special characters"
}
},
{
"name": "sshPublicKey",
"type": "Microsoft.Compute.CredentialsCombo",
"label": {
"sshPublicKey": "SSH Public Key"
},
"toolTip": {
"sshPublicKey": "Deployed virtual machines will have this public key added to the admin user's authorized_keys. Only ssh-rsa, ecdsa-sha2-nistp256, and ecdsa-sha2-nistp384 keys are supported."
},
"constraints": {
"required": true
},
"options": {
"hidePassword": true
},
"osPlatform": "Linux"
}
],
"steps": [
{
"name": "smaBranch",
"label": "SMA Branch",
"subLabel": {
"preValidation": "Configure SMA branch",
"postValidation": "Done"
},
"bladeTitle": "SMA Branch",
"elements": [
{
"name": "smaBranchSection",
"type": "Microsoft.Common.Section",
"label": "Select the SMA1000 branch to be deployed",
"elements": [
{
"name": "smaBranch",
"type": "Microsoft.Common.OptionsGroup",
"label": "SMA Branch",
"defaultValue": "12.4.2",
"constraints": {
"allowedValues": [
{
"label": "12.4.2",
"value": "12.4.2"
},
{
"label": "12.4.1",
"value": "12.4.1"
},
{
"label": "12.4.0",
"value": "12.4.0"
}
],
"required": true
}
}
]
}
]
},
{
"name": "centralManagement",
"label": "Central Management",
"subLabel": {
"preValidation": "Configure central management",
"postValidation": "Done"
},
"bladeTitle": "Central Management",
"elements": [
{
"name": "centralManagementSection",
"type": "Microsoft.Common.Section",
"label": "Centralized management for your SMA1000 VPN deployment",
"elements": [
{
"name": "centralManagementInfo",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"icon": "Info",
"text": "SonicWall Central Management Server (CMS) provides organizations, distributed enterprises and service providers with a powerful and intuitive solution to centrally manage and rapidly deploy SonicWall Secure Mobile Access (SMA) solutions. For mid-size or large enterprises, CMS streamlines security policy management and appliance deployment, minimizing administration overhead. For Service Providers, CMS simplifies the security management of multiple clients and creates additional revenue opportunities. Administrators can cluster CMS solutions for added redundancy and scalability.",
"uri": "https://d3ik27cqx8s5ub.cloudfront.net/media/uploads/2019/08/Datasheet-CMSforSMA-US-VG-677-FINAL.pdf"
}
},
{
"name": "CMSDeploy",
"type": "Microsoft.Common.OptionsGroup",
"label": "Deploy CMS?",
"defaultValue": "Yes",
"toolTip": "Indicates if you wish to deploy a Central Management Server (CMS).",
"constraints": {
"allowedValues": [
{
"label": "Yes",
"value": true
},
{
"label": "No",
"value": false
}
],
"required": true
}
},
{
"name": "CMSSize",
"type": "Microsoft.Compute.SizeSelector",
"label": "Size",
"toolTip": "Specify the instance size for your Central Management Server (CMS) virtual machine.",
"recommendedSizes": [
"Standard_D2_v3"
],
"options": {
"hideDiskTypeFilter": false
},
"osPlatform": "Linux",
"count": 1,
"constraints": {
"required": "[steps('centralManagement').centralManagementSection.CMSDeploy]"
},
"visible": "[steps('centralManagement').centralManagementSection.CMSDeploy]"
}
]
}
]
},
{
"name": "appliances",
"label": "VPN Appliances",
"subLabel": {
"preValidation": "Configure VPN appliances",
"postValidation": "Done"
},
"bladeTitle": "VPN Appliances",
"elements": [
{
"name": "appliancesSection",
"type": "Microsoft.Common.Section",
"label": "Customize your SMA1000 VPN appliances",
"elements": [
{
"name": "appliancesCount",
"type": "Microsoft.Common.TextBox",
"label": "Count",
"defaultValue": "3",
"toolTip": "Specify the number of SMA1000 VPN appliances you wish to deploy.",
"constraints": {
"required": true,
"regex": "^(?:[0-9]|[1-9][0-9]|100)$",
"validationMessage": "Must be a valid integer between 0 and 100."
}
},
{
"name": "appliancesSize",
"type": "Microsoft.Compute.SizeSelector",
"label": "Size",
"toolTip": "Specify the instance size for your SMA1000 VPN appliance virtual machine(s).",
"recommendedSizes": [
"Standard_F2",
"Standard_F4s_v2",
"Standard_F8s_v2"
],
"constraints": {
"allowedSizes": [
"Standard_F2",
"Standard_F4s_v2",
"Standard_F8s_v2"
]
},
"options": {
"hideDiskTypeFilter": false
},
"osPlatform": "Linux",
"count": "[steps('appliances').appliancesSection.appliancesCount]",
"visible": "[greater(steps('appliances').appliancesSection.appliancesCount, 0)]"
}
]
}
]
},
{
"name": "networking",
"label": "Networking",
"subLabel": {
"preValidation": "Configure virtual network",
"postValidation": "Done"
},
"bladeTitle": "Networking",
"elements": [
{
"name": "virtualNetwork",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual Network",
"subnets": "Subnet"
},
"toolTip": {
"virtualNetwork": "Only virtual networks in the currently selected subscription and location are listed. If you choose to a create a new virtual network, it will be created in the same subscription, location and resource group specified in the Basics step.",
"subnets": "Only subnets in the selected virtual network are listed."
},
"defaultValue": {
"name": "[concat('vnet-prod-', location(), '-001')]",
"addressPrefixSize": "/16"
},
"constraints": {
"minAddressPrefixSize": "/32"
},
"options": {
"hideExisting": false
},
"subnets": {
"subnet1": {
"label": "Subnet",
"defaultValue": {
"name": "snet-001",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/32"
}
}
}
},
{
"name": "vpnAccessCIDR",
"type": "Microsoft.Common.TextBox",
"label": "VPN Access CIDR",
"toolTip": "Allow access to VPN and Workplace resources only from this IP range.",
"defaultValue": "0.0.0.0/0",
"constraints": {
"required": true,
"regex": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$",
"validationMessage": "Must be a valid CIDR block."
},
"visible": "[greater(steps('appliances').appliancesSection.appliancesCount, 0)]"
},
{
"name": "adminCIDR",
"type": "Microsoft.Common.TextBox",
"label": "Admin CIDR",
"toolTip": "Allow administrative traffic only from this IP range.",
"defaultValue": "0.0.0.0/0",
"constraints": {
"required": true,
"regex": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$",
"validationMessage": "Must be a valid CIDR block."
}
}
]
}
],
"outputs": {
"adminCIDR": "[steps('networking').adminCIDR]",
"adminPassword": "[basics('adminPassword')]",
"appliancesCount": "[int(steps('appliances').appliancesSection.appliancesCount)]",
"appliancesSize": "[steps('appliances').appliancesSection.appliancesSize]",
"CMSDeploy": "[steps('centralManagement').centralManagementSection.CMSDeploy]",
"CMSSize": "[steps('centralManagement').centralManagementSection.CMSSize]",
"location": "[location()]",
"smaBranch": "[steps('smaBranch').smaBranchSection.smaBranch]",
"sshPublicKey": "[basics('sshPublicKey').sshPublicKey]",
"subnetName": "[steps('networking').virtualNetwork.subnets.subnet1.name]",
"subnetCIDR": "[steps('networking').virtualNetwork.subnets.subnet1.addressPrefix]",
"subnetResourceGroup": "[steps('networking').virtualNetwork.resourceGroup]",
"virtualNetworkCIDR": "[first(steps('networking').virtualNetwork.addressPrefixes)]",
"virtualNetworkName": "[steps('networking').virtualNetwork.name]",
"virtualNetworkCreate": "[equals(steps('networking').virtualNetwork.newOrExisting, 'new')]",
"vpnAccessCIDR": "[steps('networking').vpnAccessCIDR]"
}
}
}