-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcreateUiDefinition.json
198 lines (198 loc) · 7.29 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
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json",
"handler": "Microsoft.Compute.MultiVm",
"version": "0.1.2-preview",
"parameters": {
"basics": [
{
"name": "adminUsername",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "Username",
"defaultValue": "pt",
"toolTip": "Admin username for PT Application Firewall",
"osPlatform": "Linux"
},
{
"name": "SSHCredentials",
"type": "Microsoft.Compute.CredentialsCombo",
"label": {
"authenticationType": "Authentication type",
"password": "Password",
"confirmPassword": "Confirm password",
"sshPublicKey": "SSH public key"
},
"toolTip": {
"authenticationType": "Type of authentification for ssh access",
"password": "Password for ssh access",
"sshPublicKey": "Public key for ssh access"
},
"constraints": {
"required": true
},
"options": {
"hideConfirmation": false
},
"osPlatform": "Linux"
}
],
"steps": [
{
"name": "envconfig",
"label": "Environment",
"subLabel": {
"preValidation": "Storage account, networking, etc",
"postValidation": "Done"
},
"bladeTitle": "Storage and Networking",
"elements": [
{
"name": "newStorageAccount",
"type": "Microsoft.Storage.StorageAccountSelector",
"label": "Storage Account Name",
"defaultValue": {
"type": "Standard_LRS"
},
"constraints": {
"allowedTypes": ["Standard_LRS"]
}
},
{
"name": "newVirtualNetwork",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual network",
"subnets": "Subnets"
},
"toolTip": {
"virtualNetwork": "Virtual network for PT AF",
"subnets": "WAN and LAN subnets for PT AF vm"
},
"defaultValue": {
"name": "ptaf-vnet",
"addressPrefixSize": "/16"
},
"constraints": {
"minAddressPrefixSize": "/16"
},
"options": {
"hideExisting": false
},
"subnets": {
"wan": {
"label": "WAN subnet",
"defaultValue": {
"name": "WAN",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 0,
"requireContiguousAddresses": true
}
},
"lan": {
"label": "LAN subnet",
"defaultValue": {
"name": "LAN",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 0,
"requireContiguousAddresses": true
}
}
},
"visible": true
}
]
},
{
"name": "PtafConfig",
"label": "PT Application Firewall Configuration",
"subLabel": {
"preValidation": "VM's size, name and PT AF license",
"postValidation": "Done"
},
"bladeTitle": "PTAF vm Configuration",
"elements": [
{
"name": "virtualMachineName",
"type": "Microsoft.Common.TextBox",
"label": "PT Application Firewall virtual machine name",
"toolTip": "VM name and hostname in resource group after deployment",
"constraints": {
"required": true,
"regex": "^[a-z0-9\\-_]{8,24}$",
"validationMessage": "VM names must be between 8 and 24 characters long, and can contain only lowercase letters, numbers, hyphens and underscores"
}
},
{
"name": "virtualMachineSize",
"type": "Microsoft.Compute.SizeSelector",
"label": "Virtual machine size",
"toolTip": "Size of Azure virtual machine to provision for PT Application Firewall",
"recommendedSizes": [
"Standard_F4",
"Standard_F8",
"Standard_F16"
],
"constraints": {
"allowedSizes": [
"Standard_A4",
"Standard_A6",
"Standard_A7",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_F4",
"Standard_F8",
"Standard_F16"
]
},
"osPlatform": "Linux",
"imageReference": {
"publisher": "ptsecurity",
"offer": "ptaf-vm-preview",
"sku": "byol"
}
},
{
"name": "License",
"type": "Microsoft.Common.TextBox",
"label": "PT AF license",
"defaultValue": "",
"toolTip": "PT AF license key. You can left it empty and apply your license later",
"constraints": {
"required": false,
"regex": "^[a-z0-9A-Z]{8}$",
"validationMessage": "License key must be 8 characters long, and can contain only alphanumeric characters"
},
"visible": true
}
]
}
],
"outputs": {
"storageAccountName": "[steps('envconfig').newStorageAccount.name]",
"storageAccountType": "[steps('envconfig').newStorageAccount.type]",
"newOrExistingStorageAccount" : "[steps('envconfig').newStorageAccount.newOrExisting]",
"storageAccountExistingRG": "[steps('envconfig').newStorageAccount.resourceGroup]",
"virtualMachineName": "[steps('PtafConfig').virtualMachineName]",
"adminUsername": "[basics('adminUsername')]",
"adminPassword": "[basics('SSHCredentials').password]",
"authenticationType": "[basics('SSHCredentials').authenticationType]",
"sshKey": "[basics('SSHCredentials').sshPublicKey]",
"virtualMachineSize": "[steps('PtafConfig').virtualMachineSize]",
"virtualNetworkExistingRG": "[steps('envconfig').newVirtualNetwork.resourceGroup]",
"vnetName": "[steps('envconfig').newVirtualNetwork.name]",
"newOrExistingVirtualNetwork": "[steps('envconfig').newVirtualNetwork.newOrExisting]",
"vnetMask": "[first(steps('envconfig').newVirtualNetwork.addressPrefixes)]",
"wanAddressPrefix": "[steps('envconfig').newVirtualNetwork.subnets.wan.addressPrefix]",
"lanAddressPrefix": "[steps('envconfig').newVirtualNetwork.subnets.lan.addressPrefix]",
"lanName": "[steps('envconfig').newVirtualNetwork.subnets.lan.name]",
"wanName": "[steps('envconfig').newVirtualNetwork.subnets.wan.name]",
"license": "[steps('PtafConfig').License]",
"location": "[location()]"
}
}
}