-
Notifications
You must be signed in to change notification settings - Fork 0
/
createUiDefinition.json
233 lines (233 loc) · 12.7 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
{
"$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": [],
"steps": [
{
"name": "networkingConfig",
"label": "Networking",
"elements": [
{
"name": "networkSection",
"label": "",
"type": "Microsoft.Common.Section",
"elements": [
{
"name": "vnet",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual network",
"subnets": "Subnets"
},
"toolTip": {
"virtualNetwork": "",
"subnets": ""
},
"defaultValue": {
"name": "vnet01",
"addressPrefixSize": "/16"
},
"constraints": {
"minAddressPrefixSize": "/16"
},
"options": {
"hideExisting": false
},
"subnets": {
"gatewaySubnetName": {
"label": "Gateway subnet",
"defaultValue": {
"name": "gateway-snet",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 12,
"requireContiguousAddresses": true
}
},
"guestSubnetName": {
"label": "Guest subnet",
"defaultValue": {
"name": "guest-snet",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 12,
"requireContiguousAddresses": true
}
}
},
"visible": true
}
],
"visible": true
},
{
"name": "nsgSection",
"type": "Microsoft.Common.Section",
"label": "Network security groups",
"elements": [
{
"name": "gatewaySubnetNSGName",
"type": "Microsoft.Common.TextBox",
"label": "Gateway subnet NSG name",
"toolTip": "",
"defaultValue": "gateway-snet-nsg",
"constraints": {
"required": true,
"regex": "^[a-z0-9A-Z-]{3,40}$",
"validationMessage": "The security group name must be between 3 and 40 characters long and contain letters, numbers and hyphens only."
}
}
],
"visible": true
}
]
},
{
"name": "gatewayConfig",
"label": "AppM Desktop Gateway",
"elements": [
{
"name": "containerSection",
"type": "Microsoft.Common.Section",
"label": "WebApp settings",
"elements": [
{
"name": "appmWebsiteAddress",
"type": "Microsoft.Common.TextBox",
"label": "AppM Website Address",
"placeholder": "%customerName%.appm.juriba.app",
"toolTip": "This will be used to allow communication from main AppM website. Please enter in format %customername%.appm.juriba.app",
"constraints": {
"required": true,
"regex": "^[a-z0-9]{3,10}.appm.juriba.app$",
"validationMessage": "The AppM site must be in format %customername%.appm.juriba.app. Customer name element of site must be between 3 and 10 characters"
}
},
{
"name": "gatewayImageName",
"type": "Microsoft.Common.DropDown",
"label": "AppM version",
"placeholder": "",
"defaultValue": "latest",
"toolTip": "",
"constraints": {
"allowedValues": [
{
"label": "latest",
"value": "latest"
}
],
"required": true
},
"visible": true
},
{
"name": "appServiceAvailabilityApi",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "POST",
"path": "[concat(subscription().id, '/providers/Microsoft.Web/checknameavailability?api-version=2021-02-01')]",
"body": "[parse(concat('{\"name\":\"', concat('', steps('gatewayConfig').containerSection.gatewayWebAppName), '\", \"type\": \"Microsoft.Web/sites\"}'))]"
}
},
{
"name": "gatewayWebAppName",
"type": "Microsoft.Common.TextBox",
"label": "Gateway WebApp Name",
"toolTip": "Defines the name for Azure gateway web app address. For example %gateway_webapp_name%",
"placeholder": "%gateway_webapp_name%",
"constraints": {
"validations": [
{
"regex": "^[a-z0-9A-Z-]{3,30}$",
"message": "The webapp name must be between 3 and 30 characters long and contain letters, numbers and hyphens only."
},
{
"isValid": "[not(equals(steps('gatewayConfig').containerSection.appServiceAvailabilityApi.nameAvailable, false))]",
"message": "[concat('Error with the url: ', steps('gatewayConfig').containerSection.gatewayWebAppName, '. Reason: ', steps('gatewayConfig').containerSection.appServiceAvailabilityApi.reason)]"
},
{
"isValid": "[greater(length(steps('gatewayConfig').containerSection.gatewayWebAppName), 2)]",
"message": "The unique domain suffix should be 3 characters or more."
},
{
"isValid": "[less(length(steps('gatewayConfig').containerSection.gatewayWebAppName), 31)]",
"message": "The unique domain suffix should be shorter than 30 characters."
}
]
}
}
],
"visible": true
},
{
"name": "section1",
"type": "Microsoft.Common.Section",
"label": "URLs to be created:",
"elements": [
{
"name": "domainExamplePortal",
"type": "Microsoft.Common.TextBlock",
"visible": true,
"options": {
"text": "[concat('https://', steps('gatewayConfig').containerSection.gatewayWebAppName, '.azurewebsites.net - Azure Gateway Web App URL')]"
}
}
],
"visible": true
},
{
"name": "encryptionSection",
"type": "Microsoft.Common.Section",
"label": "Encryption settings",
"elements": [
{
"name": "gatewayEncryptionInfo",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"icon": "Info",
"text": "Please enter the encryption key generated by AppM, this may have to be added retrospectively within the webapp's configuration .",
"uri": "https://docs.juriba.com/appm/next"
}
},
{
"name": "gatewayEncryptionKey",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Encryption key",
"confirmPassword": "Confirm key"
},
"toolTip": "",
"constraints": {
"required": true
}
}
],
"visible": true
}
]
}
],
"outputs": {
"virtualNetworkNewOrExisting": "[steps('networkingConfig').networkSection.vnet.newOrExisting]",
"virtualNetworkName": "[steps('networkingConfig').networkSection.vnet.name]",
"virtualNetworkAddressPrefixes": "[steps('networkingConfig').networkSection.vnet.addressPrefixes]",
"gatewaySubnetName": "[steps('networkingConfig').networkSection.vnet.subnets.gatewaySubnetName.name]",
"gatewaySubnetAddressPrefix": "[steps('networkingConfig').networkSection.vnet.subnets.gatewaySubnetName.addressPrefix]",
"guestSubnetName": "[steps('networkingConfig').networkSection.vnet.subnets.guestSubnetName.name]",
"guestSubnetAddressPrefix": "[steps('networkingConfig').networkSection.vnet.subnets.guestSubnetName.addressPrefix]",
"gatewaySubnetNSGName": "[steps('networkingConfig').nsgSection.gatewaySubnetNSGName]",
"gatewayWebAppName": "[steps('gatewayConfig').containerSection.gatewayWebAppName]",
"appmWebsiteAddress": "[steps('gatewayConfig').containerSection.appmWebsiteAddress]",
"gatewayImageName": "[steps('gatewayConfig').containerSection.gatewayImageName]",
"gatewayEncryptionKey": "[steps('gatewayConfig').encryptionSection.gatewayEncryptionKey]"
}
}
}