forked from sonicwall/sonicwall-nsv-azure-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateUiDefinition.json
289 lines (289 loc) · 13.8 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
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"basics": [
{
"name": "vmName",
"type": "Microsoft.Common.TextBox",
"label": "VM Name",
"toolTip": "The name of the new VM instance.",
"constraints": {
"required": true,
"regex": "^[a-zA-Z0-9]{3,24}$",
"validationMessage": "VM names must be between 3 and 24 characters long, and can contain only numbers and letters."
}
},
{
"name": "usernameinfo",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"icon": "None",
"text": "SSH username: \"management\""
}
},
{
"name": "SSHCredentials",
"type": "Microsoft.Compute.CredentialsCombo",
"label": {
"authenticationType": "Authentication type",
"password": "Password",
"confirmPassword": "Confirm password",
"sshPublicKey": "SSH public key"
},
"toolTip": {
"authenticationType": "Authentication Type for the SonicWall NSv",
"password": "Password for the Virtual Machine",
"sshPublicKey": "SSH Public Key for the SonicWall NSv"
},
"constraints": {
"required": true
},
"options": {
"hideConfirmation": false
},
"osPlatform": "Linux"
}
],
"steps": [
{
"name": "instanceDetails",
"label": "Instance Details",
"subLabel": {
"preValidation": "Configure Instance Details",
"postValidation": "Done"
},
"bladeTitle": "Instance Details",
"elements": [
{
"name": "nsvPlan",
"type": "Microsoft.Common.DropDown",
"label": "NSv plan",
"defaultValue": "NSv 7.1 or newer",
"toolTip": "The NSv plan (also known as SKU).",
"constraints": {
"allowedValues": [
{
"label": "NSv 7.0",
"value": "snwl-nsv-byol"
},
{
"label": "NSv 7.1 or newer",
"value": "snwl-nsv-scx"
}
],
"required": true
},
"visible": true
},
{
"name": "vmSizeSkuSc",
"type": "Microsoft.Compute.SizeSelector",
"label": "Virtual machine size of the \"NSv 7.0\" plan",
"toolTip": "The size of VM to provision.",
"recommendedSizes": [
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_B2ms",
"Standard_B4ms",
"Standard_D2ds_v4",
"Standard_D2s_v4",
"Standard_D2_v4",
"Standard_DS3_v2"
],
"constraints": {
"allowedSizes": [
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_B2ms",
"Standard_B4ms",
"Standard_D2ds_v4",
"Standard_D2s_v4",
"Standard_D2_v4",
"Standard_DS3_v2"
]
},
"osPlatform": "Linux",
"imageReference": {
"publisher": "sonicwall-inc",
"offer": "sonicwall-nsz-azure",
"sku": "snwl-nsv-byol"
},
"count": "1",
"visible": "[equals(steps('instanceDetails').nsvPlan, 'snwl-nsv-byol')]"
},
{
"name": "vmSizeSkuScx",
"type": "Microsoft.Compute.SizeSelector",
"label": "Virtual machine size of the \"NSv 7.1 or newer\" plan",
"toolTip": "The size of VM to provision.",
"recommendedSizes": [
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_B2ms",
"Standard_B4ms",
"Standard_D2ds_v4",
"Standard_D2s_v4",
"Standard_D2_v4"
],
"constraints": {
"allowedSizes": [
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_B2ms",
"Standard_B4ms",
"Standard_D2ds_v4",
"Standard_D2s_v4",
"Standard_D2_v4"
]
},
"osPlatform": "Linux",
"imageReference": {
"publisher": "sonicwall-inc",
"offer": "sonicwall-nsz-azure",
"sku": "snwl-nsv-scx"
},
"count": "1",
"visible": "[equals(steps('instanceDetails').nsvPlan, 'snwl-nsv-scx')]"
},
{
"name": "vnetSpec",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual Network",
"subnets": "Subnets"
},
"toolTip": {
"virtualNetwork": "Virtual Network the instance will be placed in.",
"subnets": "Subnet definitons for WAN and LAN zone."
},
"defaultValue": {
"name": "fwVirtualNet",
"addressPrefixSize": "/16"
},
"constraints": {
"minAddressPrefixSize": "/29"
},
"subnets": {
"subnet1": {
"label": "WAN X1 subnet",
"defaultValue": {
"name": "WAN-X1",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/29",
"minAddressCount": 1,
"requireContiguousAddresses": true
}
},
"subnet2": {
"label": "LAN X0 subnet",
"defaultValue": {
"name": "LAN-X0",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/29",
"minAddressCount": 4,
"requireContiguousAddresses": true
}
}
}
},
{
"name": "publicIpAddress",
"type": "Microsoft.Network.PublicIpAddressCombo",
"label": {
"publicIpAddress": "Public IP Address",
"domainNameLabel": "DNS Prefix for the public IP Address"
},
"toolTip": {
"publicIpAddress": "Public IP Address for the SonicWall NSv",
"domainNameLabel": "DNS Prefix for the public IP Address, must be globally unique"
},
"defaultValue": {
"publicIpAddressName": "[concat(basics('vmName'), '-ip')]",
"domainNameLabel": "[concat(basics('vmName'), '-', take(replace(guid(), '-', ''), 10))]"
},
"constraints": {
"required": {
"domainNameLabel": true
}
},
"options": {
"hideExisting": false,
"hideNone": false
}
},
{
"name": "managementCidr",
"type": "Microsoft.Common.TextBox",
"label": "Management source IP",
"toolTip": "Public IP address allowed access SonicWall NSv HTTPS & SSH management",
"constraints": {
"required": true,
"regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$",
"validationMessage": "Please enter a valid IPv4 address"
},
"visible": true
},
{
"name": "storageSpec",
"type": "Microsoft.Storage.StorageAccountSelector",
"label": "Storage Account",
"toolTip": "Storage account to be used for disk blobs and diagnostics.",
"defaultValue": {
"type": "Standard_LRS"
},
"constraints": {
"allowedTypes": [
"Standard_LRS",
"Standard_GRS"
]
}
}
]
}
],
"outputs": {
"vmName": "[basics('vmName')]",
"imageSku": "[steps('instanceDetails').nsvPlan]",
"vmSizeSc": "[steps('instanceDetails').vmSizeSkuSc]",
"vmSizeScx": "[steps('instanceDetails').vmSizeSkuScx]",
"authenticationType": "[basics('SSHCredentials').authenticationType]",
"SSHPassword": "[coalesce(basics('SSHCredentials').password, basics('SSHCredentials').sshPublicKey)]",
"sshKey": "[coalesce(basics('SSHCredentials').password, basics('SSHCredentials').sshPublicKey)]",
"virtualNetworkNewOrExisting": "[steps('instanceDetails').vnetSpec.newOrExisting]",
"virtualNetworkResourceGroupName": "[steps('instanceDetails').vnetSpec.resourceGroup]",
"virtualNetworkName": "[steps('instanceDetails').vnetSpec.name]",
"virtualNetworkAddressPrefix": "[steps('instanceDetails').vnetSpec.addressPrefixes]",
"subnetWANName": "[steps('instanceDetails').vnetSpec.subnets.subnet1.name]",
"subnetWANPrefix": "[steps('instanceDetails').vnetSpec.subnets.subnet1.addressPrefix]",
"subnetLANName": "[steps('instanceDetails').vnetSpec.subnets.subnet2.name]",
"subnetLANPrefix": "[steps('instanceDetails').vnetSpec.subnets.subnet2.addressPrefix]",
"storageAccountNewOrExisting": "[steps('instanceDetails').storageSpec.newOrExisting]",
"storageAccountResourceGroupName": "[steps('instanceDetails').storageSpec.resourceGroup]",
"storageAccount": "[steps('instanceDetails').storageSpec.name]",
"storageAccountType": "[steps('instanceDetails').storageSpec.type]",
"managementAccessIPSource": "[steps('instanceDetails').managementCidr]",
"publicIpNewOrExisting": "[steps('instanceDetails').publicIpAddress.newOrExistingOrNone]",
"publicIpName": "[steps('instanceDetails').publicIpAddress.name]",
"publicIpDns": "[steps('instanceDetails').publicIpAddress.domainNameLabel]",
"publicIpResourceGroupName": "[steps('instanceDetails').publicIpAddress.resourceGroup]",
"publicIPAllocationMethod": "[steps('instanceDetails').publicIpAddress.publicIPAllocationMethod]",
"publicIpSku": "[steps('instanceDetails').publicIpAddress.sku]",
"location": "[location()]"
}
}
}