-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateUiDefinition.json
229 lines (229 loc) · 10.9 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
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"resourceTypes": [
"microsoft.resources/resourcegroups"
],
"basics": [
{
"name": "contGroupName",
"type": "Microsoft.Common.TextBox",
"label": "Cont Group Name",
"defaultValue": "msdyn365bc",
"toolTip": "Name for the container group",
"constraints": {
"required": false,
"regex": "^[a-z0-9-]{1,63}$",
"validationMessage": "The container must contain only lowercase letters, numbers, and dashes. It cannot start or end with a dash and consecutive dashes are not allowed. The maximum length is 63"
}
},
{
"name": "dnsPrefix",
"type": "Microsoft.Common.TextBox",
"label": "Dns Prefix",
"defaultValue": "",
"toolTip": "The DNS label for the public IP address. It must be lowercase. It should match the following regular expression, or it will raise an error: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$",
"constraints": {
"required": true,
"regex": "^[a-z0-9-]{5,63}$",
"validationMessage": "The container must contain only lowercase letters, numbers, and dashes. It cannot start or end with a dash and consecutive dashes are not allowed. The length must be between 5 and 63"
}
},
{
"name": "letsEncryptMail",
"type": "Microsoft.Common.TextBox",
"label": "Lets Encrypt Mail",
"defaultValue": "",
"toolTip": "The eMail address to be used when requesting a Let's Encrypt certificate",
"constraints": {
"required": true,
"regex": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$",
"validationMessage": "Please enter a valid email address"
}
},
{
"name": "bcArtifactUrl",
"type": "Microsoft.Common.TextBox",
"label": "Bc Artifact Url",
"defaultValue": "https://bcartifacts.azureedge.net/onprem/19.2.32968.33504/w1",
"toolTip": "Dynamics 365 Business Central artifact URL. See https://freddysblog.com/2020/06/25/working-with-artifacts/ to understand how to find the right one.",
"constraints": {
"required": false,
"regex": "^(http(s)?:\/\/).{20,250}$",
"validationMessage": "Please enter a valid URL"
}
},
{
"name": "username",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "Username",
"osPlatform": "Windows",
"toolTip": "Username for your BC super user",
"constraints": {
"required": true
}
},
{
"name": "password",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Password",
"confirmPassword": "Confirm password"
},
"toolTip": "Password for your BC super user and your sa user on the database",
"constraints": {
"required": true
}
},
{
"name": "cpuCores",
"type": "Microsoft.Common.TextBox",
"label": "Cpu Cores",
"defaultValue": "",
"toolTip": "The number of CPU cores to allocate to the container",
"constraints": {
"required": false,
"regex": "^[1-4]{1}$",
"validationMessage": "You can enter between 1 and 4 cores"
}
},
{
"name": "memoryInGb",
"type": "Microsoft.Common.TextBox",
"label": "Memory In Gb",
"defaultValue": "4",
"toolTip": "The amount of memory to allocate to the container in gigabytes. Provide a minimum of 3 as he container will include SQL Server and BCST",
"constraints": {
"required": false,
"regex": "^([1-9]{1}|1[0-6]{1})$",
"validationMessage": "You can enter between 1 and 16 gigabytes of memory"
}
},
{
"name": "acceptEula",
"type": "Microsoft.Common.DropDown",
"label": "Accept Eula",
"defaultValue": "N",
"toolTip": "Change to 'Y' to accept the end user license agreement available at https://go.microsoft.com/fwlink/?linkid=861843. This is necessary to successfully run the container",
"constraints": {
"required": false,
"allowedValues": [
{
"label": "Y",
"value": "Y"
},
{
"label": "N",
"value": "N"
}
]
}
},
{
"name": "_artifactsLocation",
"type": "Microsoft.Common.TextBox",
"label": "_artifacts Location",
"defaultValue": "[[deployment().properties.templateLink.uri]",
"toolTip": "The base URI where artifacts required by this template are located including a trailing '/'",
"constraints": {
"required": false,
"regex": "^.*$",
"validationMessage": "Not visible"
},
"visible": false
},
{
"name": "_artifactsLocationSasToken",
"type": "Microsoft.Common.TextBox",
"label": "_artifacts Location Sas Token",
"toolTip": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured.",
"constraints": {
"required": false,
"regex": "^.*$",
"validationMessage": "Not visible"
},
"visible": false
}
],
"steps": [
{
"name": "advancedConfig",
"label": "Advanced configuration settings",
"elements": [
{
"name": "bcRelease",
"type": "Microsoft.Common.TextBox",
"label": "BC Generic Image",
"defaultValue": "mcr.microsoft.com/businesscentral:10.0.19041.985",
"toolTip": "Dynamics 365 Business Central Generic image (10.0.19041.985 is the version of Windows Server). See https://mcr.microsoft.com/v2/businesscentral/tags/list",
"constraints": {
"required": false,
"regex": "^.*$",
"validationMessage": "Shouldn't fail"
}
},
{
"name": "customNavSettings",
"type": "Microsoft.Common.TextBox",
"label": "Custom Nav Settings",
"defaultValue": "",
"toolTip": "Custom settings for the BCST",
"constraints": {
"required": false,
"regex": "^.*$",
"validationMessage": "Shouldn't fail"
}
},
{
"name": "customWebSettings",
"type": "Microsoft.Common.TextBox",
"label": "Custom Web Settings",
"defaultValue": "",
"toolTip": "Custom settings for the Web Client",
"constraints": {
"required": false,
"regex": "^.*$",
"validationMessage": "Shouldn't fail"
}
},
{
"name": "azurecontainerSuffix",
"type": "Microsoft.Common.DropDown",
"label": "Azurecontainer Suffix",
"defaultValue": ".azurecontainer.io",
"toolTip": "Please select the Azure container URL suffix for your current region. For the standard Azure cloud, this is azurecontainer.io",
"constraints": {
"required": false,
"allowedValues": [
{
"label": ".azurecontainer.io",
"value": ".azurecontainer.io"
}
]
}
}
]
}
],
"outputs": {
"contGroupName": "[basics('contGroupName')]",
"dnsPrefix": "[basics('dnsPrefix')]",
"letsEncryptMail": "[basics('letsEncryptMail')]",
"bcRelease": "[steps('advancedConfig').bcRelease]",
"bcArtifactUrl": "[basics('bcArtifactUrl')]",
"username": "[basics('username')]",
"password": "[basics('password')]",
"cpuCores": "[basics('cpuCores')]",
"memoryInGb": "[basics('memoryInGb')]",
"customNavSettings": "[steps('advancedConfig').customNavSettings]",
"customWebSettings": "[steps('advancedConfig').customWebSettings]",
"acceptEula": "[basics('acceptEula')]",
"azurecontainerSuffix": "[steps('advancedConfig').azurecontainerSuffix]",
"location": "[location()]",
"_artifactsLocation": "[basics('_artifactsLocation')]",
"_artifactsLocationSasToken": "[basics('_artifactsLocationSasToken')]"
}
}
}