-
Notifications
You must be signed in to change notification settings - Fork 55
/
getbc.json
983 lines (983 loc) · 45.6 KB
/
getbc.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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string",
"defaultValue": "",
"minLength": 3,
"metadata": {
"Description": "Select the name of the deployment"
}
},
"TimezoneId": {
"type": "string",
"defaultValue": "GMT Standard Time",
"allowedValues": [ "Dateline Standard Time","UTC-11","Aleutian Standard Time","Hawaiian Standard Time","Marquesas Standard Time","Alaskan Standard Time","UTC-09","Pacific Standard Time (Mexico)","UTC-08","Pacific Standard Time","US Mountain Standard Time","Mountain Standard Time (Mexico)","Mountain Standard Time","Central America Standard Time","Central Standard Time","Easter Island Standard Time","Central Standard Time (Mexico)","Canada Central Standard Time","SA Pacific Standard Time","Eastern Standard Time (Mexico)","Eastern Standard Time","Haiti Standard Time","Cuba Standard Time","US Eastern Standard Time","Turks And Caicos Standard Time","Paraguay Standard Time","Atlantic Standard Time","Venezuela Standard Time","Central Brazilian Standard Time","SA Western Standard Time","Pacific SA Standard Time","Newfoundland Standard Time","Tocantins Standard Time","E. South America Standard Time","SA Eastern Standard Time","Argentina Standard Time","Greenland Standard Time","Montevideo Standard Time","Magallanes Standard Time","Saint Pierre Standard Time","Bahia Standard Time","UTC-02","Mid-Atlantic Standard Time","Azores Standard Time","Cape Verde Standard Time","UTC","Morocco Standard Time","GMT Standard Time","Greenwich Standard Time","W. Europe Standard Time","Central Europe Standard Time","Romance Standard Time","Central European Standard Time","W. Central Africa Standard Time","Jordan Standard Time","GTB Standard Time","Middle East Standard Time","Egypt Standard Time","E. Europe Standard Time","Syria Standard Time","West Bank Standard Time","South Africa Standard Time","FLE Standard Time","Israel Standard Time","Kaliningrad Standard Time","Sudan Standard Time","Libya Standard Time","Namibia Standard Time","Arabic Standard Time","Turkey Standard Time","Arab Standard Time","Belarus Standard Time","Russian Standard Time","E. Africa Standard Time","Iran Standard Time","Arabian Standard Time","Astrakhan Standard Time","Azerbaijan Standard Time","Russia Time Zone 3","Mauritius Standard Time","Saratov Standard Time","Georgian Standard Time","Caucasus Standard Time","Afghanistan Standard Time","West Asia Standard Time","Ekaterinburg Standard Time","Pakistan Standard Time","India Standard Time","Sri Lanka Standard Time","Nepal Standard Time","Central Asia Standard Time","Bangladesh Standard Time","Omsk Standard Time","Myanmar Standard Time","SE Asia Standard Time","Altai Standard Time","W. Mongolia Standard Time","North Asia Standard Time","N. Central Asia Standard Time","Tomsk Standard Time","China Standard Time","North Asia East Standard Time","Singapore Standard Time","W. Australia Standard Time","Taipei Standard Time","Ulaanbaatar Standard Time","North Korea Standard Time","Aus Central W. Standard Time","Transbaikal Standard Time","Tokyo Standard Time","Korea Standard Time","Yakutsk Standard Time","Cen. Australia Standard Time","AUS Central Standard Time","E. Australia Standard Time","AUS Eastern Standard Time","West Pacific Standard Time","Tasmania Standard Time","Vladivostok Standard Time","Lord Howe Standard Time","Bougainville Standard Time","Russia Time Zone 10","Magadan Standard Time","Norfolk Standard Time","Sakhalin Standard Time","Central Pacific Standard Time","Russia Time Zone 11","New Zealand Standard Time","UTC+12","Fiji Standard Time","Kamchatka Standard Time","Chatham Islands Standard Time","UTC+13","Tonga Standard Time","Samoa Standard Time","Line Islands Standard Time" ],
"metadata": {
"Description": "Timezone of VM."
}
},
"AcceptEula": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"minLength": 3,
"metadata": {
"Description": "In order to deploy the VM, you need to accept the EULA, which can be found here: https://go.microsoft.com/fwlink/?linkid=861843"
}
},
"AcceptInsiderEula": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "If you are going to deploy an insider build of Business Central on the VM, you will need to accept the insider EULA (https://go.microsoft.com/fwlink/?linkid=2245051)"
}
},
"RemoteDesktopAccess": {
"type": "string",
"defaultValue": "",
"minLength": 1,
"metadata": {
"Description": "Specify * (star) to allow all remote desktop access, specify - (minus) to deny all remote desktop access (use JIT) or provide an address range using CIDR notation, e.g. 10.0.0.0/24; an IP address; or a list of address ranges or IP addresses"
}
},
"WinRMAccess": {
"type": "string",
"defaultValue": "-",
"minLength": 1,
"metadata": {
"Description": "Specify * (star) to allow all WinRM access, specify - (minus) to deny all WinRM access or provide an address range using CIDR notation, e.g. 10.0.0.0/24; an IP address; or a list of address ranges or IP addresses"
}
},
"OperatingSystem": {
"type": "string",
"defaultValue": "Windows Server 2022",
"allowedValues": [
"Windows Server 2022",
"Windows Server 2019"
],
"metadata": {
"Description": "Select the Operating System of the VM"
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_D4s_v3",
"allowedValues": [
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_D2_v3",
"Standard_D4_v3",
"Standard_D8_v3",
"Standard_D16_v3",
"Standard_D32_v3",
"Standard_D48_v3",
"Standard_D64_v3",
"Standard_D2s_v3",
"Standard_D4s_v3",
"Standard_D8s_v3",
"Standard_D16s_v3",
"Standard_D32s_v3",
"Standard_D48s_v3",
"Standard_D64s_v3",
"Standard_D2_v4",
"Standard_D4_v4",
"Standard_D8_v4",
"Standard_D16_v4",
"Standard_D32_v4",
"Standard_D48_v4",
"Standard_D64_v4",
"Standard_D2s_v4",
"Standard_D4s_v4",
"Standard_D8s_v4",
"Standard_D16s_v4",
"Standard_D32s_v4",
"Standard_D48s_v4",
"Standard_D64s_v4",
"Standard_D2a_v4",
"Standard_D4a_v4",
"Standard_D8a_v4",
"Standard_D16a_v4",
"Standard_D32a_v4",
"Standard_D48a_v4",
"Standard_D64a_v4",
"Standard_D2as_v4",
"Standard_D4as_v4",
"Standard_D8as_v4",
"Standard_D16as_v4",
"Standard_D32as_v4",
"Standard_D48as_v4",
"Standard_D64as_v4",
"Standard_D2_v5",
"Standard_D4_v5",
"Standard_D8_v5",
"Standard_D16_v5",
"Standard_D32_v5",
"Standard_D48_v5",
"Standard_D64_v5",
"Standard_D2s_v5",
"Standard_D4s_v5",
"Standard_D8s_v5",
"Standard_D16s_v5",
"Standard_D32s_v5",
"Standard_D48s_v5",
"Standard_D64s_v5",
"Standard_D2a_v5",
"Standard_D4a_v5",
"Standard_D8a_v5",
"Standard_D16a_v5",
"Standard_D32a_v5",
"Standard_D48a_v5",
"Standard_D64a_v5",
"Standard_D2as_v5",
"Standard_D4as_v5",
"Standard_D8as_v5",
"Standard_D16as_v5",
"Standard_D32as_v5",
"Standard_D48as_v5",
"Standard_D64as_v5"
],
"metadata": {
"Description": "Select the VM size of the deployment"
}
},
"ContainerName": {
"type": "string",
"defaultValue": "bcserver",
"minLength": 2,
"metadata": {
"Description": "Name of the default container to create in the VM"
}
},
"Isolation": {
"type": "string",
"defaultValue": "Default",
"allowedValues": [ "Default", "Process", "Hyperv" ],
"metadata": {
"Description": "What isolation do you want to use for the main container. Default will allow BcContainerHelper to decide."
}
},
"vmAdminUsername": {
"type": "string",
"defaultValue": "vmadmin",
"minLength": 1,
"metadata": {
"Description": "Specify administrator user name for connecting to the VM"
}
},
"BCAdminUsername": {
"type": "string",
"defaultValue": "admin",
"minLength": 1,
"metadata": {
"Description": "Specify administrator user name for Business Central"
}
},
"adminPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Specify administrator password for VM, Business Central and SQL (if applicable)"
}
},
"ArtifactUrl": {
"type": "string",
"defaultValue": "bcartifacts/onprem//w1/latest",
"metadata": {
"Description": "Specify the Business Central Artifact URL or a /-separated string with parameters for Get-BcArtifactUrl: storageaccount/type/version/country/select/sasToken. This value is ignored if a Docker Image is specified."
}
},
"BCDockerImage": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Select the Business Central Docker Image to deploy. ArtifactUrl is ignored if you specify a Docker Image."
}
},
"TestToolkit": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "No", "Framework", "Libraries", "All" ],
"metadata": {
"Description": "Specify whether you want the Test Toolkit to be installed. Installing the Test Toolkit requires you to specify a license file. Specifying All installs Test Framework, Test Libraries and all Microsoft Tests."
}
},
"AssignPremiumPlan": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Assign Premium Plan to admin user. This setting only makes sense for Sandbox images (mcr.microsoft.com/businesscentral/sandbox:*)."
}
},
"CreateTestUsers": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Create a set of users for test purposes (ExternalAccountant, Premium, Essential, InternalAdmin, TeamMember and DelegatedAdmin). This setting only makes sense for Sandbox images (mcr.microsoft.com/businesscentral/sandbox:*). Setting this option to Yes requires you to specify a license file."
}
},
"LicenseFileUri": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a secure Url of your Partner License File. If you do not specify a license file Url here, you will have to upload the license manually later."
}
},
"EnableTaskScheduler": {
"type": "string",
"defaultValue": "Yes",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Enable Task Scheduler in Container"
}
},
"Office365UserName": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Enter Office 365 Administrator Email (leave empty to skip Office 365 integration)"
}
},
"Office365Password": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Enter Office 365 Administrator Password (leave empty if no Office 365 integration)"
}
},
"CreateAadUsers": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Create users from the Aad (users in Office 365) as SUPER (only when using Office 365 integration)"
}
},
"FinalSetupScriptUrl": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a Url to a PowerShell script that should be executed on the VM to do the final setup of the VM."
}
},
"BingMapsKey": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Bing Maps Key for Bing Maps Integration App installation (leave empty to skip Bing Maps Integration)"
}
},
"RunWindowsUpdate": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Run Windows Update after Deployment (might take significant time)"
}
},
"ContactEMailForLetsEncrypt": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Specify an email address of the person accepting subscriber agreement for LetsEncrypt (https://letsencrypt.org/repository/) in order to use Lets Encrypt to generate a secure SSL certificate, which is valid for 3 months."
}
},
"AutoShutdown": {
"type": "string",
"defaultValue": "Disabled",
"allowedValues": [ "Enabled", "Disabled" ],
"metadata": {
"Description": "Specifies whether you want to enable autoshutdown of the VM."
}
},
"AutoShutdownTime": {
"type": "string",
"defaultValue": "20:00",
"metadata": {
"Description": "Time of day on which the VM will be auto-shutdown (if enabled)."
}
},
"AddTraefik": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Add traefik.io as reverse proxy. When using traefik, you will find the landing page on http://publicdnsname:8180."
}
}
},
"variables": {
"nchbranch": "",
"vmName": "[trim(parameters('vmName'))]",
"TimezoneId": "[parameters('TimezoneId')]",
"AcceptEula": "[parameters('AcceptEula')]",
"AcceptInsiderEula": "[parameters('AcceptInsiderEula')]",
"vmSize": "[parameters('vmSize')]",
"RemoteDesktopAccess": "[parameters('RemoteDesktopAccess')]",
"WinRmAccess": "[parameters('WinRmAccess')]",
"containerName": "[parameters('ContainerName')]",
"Isolation": "[parameters('Isolation')]",
"vmAdminUsername": "[trim(parameters('vmAdminUsername'))]",
"navAdminUsername": "[trim(parameters('BCAdminUsername'))]",
"azureSqlAdminUsername": "sqladmin",
"adminPassword": "[parameters('adminPassword')]",
"artifactUrl": "[parameters('artifactUrl')]",
"navDockerImage": "[trim(parameters('BCDockerImage'))]",
"registryUsername": "",
"registryPassword": "",
"LicenseFileUri": "[parameters('LicenseFileUri')]",
"SQLServerType": "SQLExpress",
"AppBacpacUri": "",
"TenantBacpacUri": "",
"IncludeAppUris": "",
"CertificatePfxUrl": "",
"CertificatePfxPassword": "",
"PublicDnsName": "",
"Multitenant": "No",
"TestToolkit": "[parameters('TestToolkit')]",
"AssignPremiumPlan": "[parameters('AssignPremiumPlan')]",
"CreateTestUsers": "[parameters('CreateTestUsers')]",
"CreateAadUsers": "[parameters('CreateAadUsers')]",
"EnableSymbolLoading": "No",
"IncludeCSIDE": "No",
"IncludeAL": "No",
"ClickOnce": "No",
"EnableTaskScheduler": "[parameters('EnableTaskScheduler')]",
"Office365UserName": "[parameters('Office365UserName')]",
"Office365Password": "[parameters('Office365Password')]",
"BingMapsKey": "[parameters('BingMapsKey')]",
"FinalSetupScriptUrl": "[parameters('FinalSetupScriptUrl')]",
"RunWindowsUpdate": "[parameters('RunWindowsUpdate')]",
"ContactEMailForLetsEncrypt": "[parameters('ContactEMailForLetsEncrypt')]",
"AutoShutdown": "[parameters('AutoShutdown')]",
"AutoShutdownTime": "[parameters('AutoShutdownTime')]",
"AddTraefik": "[parameters('AddTraefik')]",
"style": "demo",
"OperatingSystem": "[parameters('OperatingSystem')]",
"imagePublisher": "[if(equals(variables('OperatingSystem'),'Windows 11'),'MicrosoftWindowsDesktop','MicrosoftWindowsServer')]",
"imageOffer": "[if(equals(variables('OperatingSystem'),'Windows 11'),'Windows-11','WindowsServer')]",
"imageSku": "[if(equals(variables('OperatingSystem'),'Windows 11'),'win11-21h2-pro',if(equals(variables('OperatingSystem'),'Windows Server 2022'),'2022-Datacenter',if(equals(variables('OperatingSystem'),'Windows Server 2019'),'2019-Datacenter','2019-Datacenter-with-containers')))]",
"storageAccountType": "Standard_LRS",
"OSDiskName": "[concat(variables('vmName'),'_osdisk')]",
"publicIPAddressName": "[concat(variables('vmName'), '_pip')]",
"storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]",
"networkSecurityGroupName": "[concat('networksecuritygroup',if(equals(parameters('AddTraefik'),'Yes'),'_traefik',''))]",
"dnsName": "[tolower(variables('vmName'))]",
"addressPrefix": "10.0.0.0/16",
"subnetName": "Subnet",
"subnetPrefix": "10.0.0.0/24",
"virtualNetworkName": "virtualnetwork",
"server1Name": "[tolower(variables('vmName'))]",
"nic1Name": "[concat(variables('vmName'),'_nic')]",
"delimiters": [ ",", ";" ],
"RdpAddresses": "[if(equals(variables('RemoteDesktopAccess'),'-'),'',variables('RemoteDesktopAccess'))]",
"rdpSourceAddressPrefix": "[split(variables('RdpAddresses'),variables('delimiters'))]",
"noOfAddresses": "[length(variables('rdpSourceAddressPrefix'))]",
"winRmAddresses": "[if(equals(variables('WinRmAccess'),'-'),'',variables('WinRmAccess'))]",
"winRmSourceAddressPrefix": "[split(variables('winRmAddresses'),variables('delimiters'))]",
"noOfWinRmAddresses": "[length(variables('winRmSourceAddressPrefix'))]",
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
"ScriptCommandToExecute": "powershell.exe -executionpolicy unrestricted -file ",
"azureSqlServer": "[concat('sql', replace(tolower(variables('vmName')),'-',''))]",
"azureSqlServerDnsName": "[concat(variables('azureSqlServer'),'.database.windows.net')]",
"SqlCollation": "Latin1_General_100_CS_AS"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "Microsoft.Sql/servers",
"name": "[variables('azureSqlServer')]",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('sqlServerType'),'AzureSQL')]",
"tags": {
"displayName": "SqlServer"
},
"properties": {
"administratorLogin": "[variables('azureSqlAdminUsername')]",
"administratorLoginPassword": "[variables('adminPassword')]",
"version": "12.0"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "firewallrules",
"name": "AllowAllAzureIps",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('sqlServerType'),'AzureSQL')]",
"dependsOn": [
"[variables('azureSqlServer')]"
],
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
}
},
{
"apiVersion": "2014-04-01-preview",
"type": "databases",
"name": "App",
"location": "[resourceGroup().location]",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('AppBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'))]"
],
"tags": {
"displayName": "App Database"
},
"properties": {
"collation": "[variables('SqlCollation')]",
"edition": "Standard",
"maxSizeBytes": "1073741824",
"requestedServiceObjectiveName": "S0"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "extensions",
"name": "Import",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('AppBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'), '/databases/App')]"
],
"tags": {
"displayName": "Import"
},
"properties": {
"storageKeyType": "SharedAccessKey",
"storageUri": "[split(variables('AppBacpacUri'),'?')[0]]",
"storageKey": "[if(contains(variables('AppBacpacUri'),'?'),concat('?',split(variables('AppBacpacUri'),'?')[1]),'')]",
"administratorLogin": "[variables('azureSqlAdminUsername')]",
"administratorLoginPassword": "[variables('adminPassword')]",
"operationMode": "Import"
}
}
]
},
{
"apiVersion": "2014-04-01-preview",
"type": "databases",
"name": "Tenant",
"location": "[resourceGroup().location]",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('TenantBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'))]"
],
"tags": {
"displayName": "Tenant Template"
},
"properties": {
"collation": "[variables('SqlCollation')]",
"edition": "Standard",
"maxSizeBytes": "1073741824",
"requestedServiceObjectiveName": "S0"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "extensions",
"name": "Import",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('TenantBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'), '/databases/Tenant')]"
],
"tags": {
"displayName": "Import"
},
"properties": {
"storageKeyType": "SharedAccessKey",
"storageUri": "[split(variables('TenantBacpacUri'),'?')[0]]",
"storageKey": "[if(contains(variables('TenantBacpacUri'),'?'),concat('?',split(variables('TenantBacpacUri'),'?')[1]),'')]",
"administratorLogin": "[variables('azureSqlAdminUsername')]",
"administratorLoginPassword": "[variables('adminPassword')]",
"operationMode": "Import"
}
}
]
}
]
},
{
"apiVersion": "2019-04-01",
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"sku": {
"name": "[variables('storageAccountType')]"
},
"kind": "StorageV2",
"location": "[resourceGroup().location]",
"properties": {
"supportsHttpsTrafficOnly": true
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIPAddressName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[variables('dnsName')]"
}
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "networkSecurityGroup",
"condition": "[equals(variables('AddTraefik'),'No')]",
"location": "[resourceGroup().location]",
"properties": {
"securityRules": [
{
"name": "HTTP",
"properties": {
"description": "Http access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "80",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 200,
"direction": "Inbound"
}
},
{
"name": "FILES",
"properties": {
"description": "File access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8080",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 210,
"direction": "Inbound"
}
},
{
"name": "HTTPS",
"properties": {
"description": "Http access over Secure Socket Layer",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 220,
"direction": "Inbound"
}
},
{
"name": "Soap",
"properties": {
"description": "Access to Soap Web Services",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7047",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 230,
"direction": "Inbound"
}
},
{
"name": "OData",
"properties": {
"description": "Access to OData Services",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7048",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 240,
"direction": "Inbound"
}
},
{
"name": "Developer",
"properties": {
"description": "Access to Developer Services",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7049",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 250,
"direction": "Inbound"
}
}
]
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "networkSecurityGroup_traefik",
"condition": "[equals(variables('AddTraefik'),'Yes')]",
"location": "[resourceGroup().location]",
"properties": {
"securityRules": [
{
"name": "HTTP",
"properties": {
"description": "Http access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "80",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 200,
"direction": "Inbound"
}
},
{
"name": "FILES",
"properties": {
"description": "File access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8080",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 210,
"direction": "Inbound"
}
},
{
"name": "HTTPS",
"properties": {
"description": "Http access over Secure Socket Layer",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 220,
"direction": "Inbound"
}
},
{
"name": "Log",
"properties": {
"description": "Access to status log if Traefik is used",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8180",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 230,
"direction": "Inbound"
}
}
]
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "rdp-0",
"condition": "[not(equals(variables('RemoteDesktopAccess'),'-'))]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"mode":"Incremental",
"parameters":{},
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {}
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "[concat('rdp-', copyIndex(1))]",
"condition": "[not(equals(variables('RemoteDesktopAccess'),'-'))]",
"dependsOn": [
"[concat('rdp-', copyIndex())]"
],
"copy": {
"name": "iterator",
"count": "[variables('noOfAddresses')]"
},
"properties": {
"mode": "Incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"apiVersion": "2016-09-01",
"name": "[concat(variables('networkSecurityGroupName'),'/Rdp',copyIndex())]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"location":"[resourceGroup().location]",
"properties":{
"description": "Remote Desktop Access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"sourceAddressPrefix": "[variables('rdpSourceAddressPrefix')[copyIndex()]]",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": "[add(copyIndex(),100)]",
"direction": "Inbound"
}
}
],
"outputs": {}
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "winrm-0",
"condition": "[not(equals(variables('WinRmAccess'),'-'))]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"mode":"Incremental",
"parameters":{},
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {}
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "[concat('winrm-', copyIndex(1))]",
"condition": "[not(equals(variables('WinRmAccess'),'-'))]",
"dependsOn": [
"[concat('winrm-', copyIndex())]"
],
"copy": {
"name": "iterator",
"count": "[variables('noOfWinRmAddresses')]"
},
"properties": {
"mode": "Incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"apiVersion": "2016-09-01",
"name": "[concat(variables('networkSecurityGroupName'),'/WinRm',copyIndex())]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"location":"[resourceGroup().location]",
"properties":{
"description": "WinRm Access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "5986",
"sourceAddressPrefix": "[variables('winRmSourceAddressPrefix')[copyIndex()]]",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": "[add(copyIndex(),300)]",
"direction": "Inbound"
}
}
],
"outputs": {}
}
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/virtualNetworks",
"name": "[variables('virtualNetworkName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('addressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('subnetName')]",
"properties": {
"addressPrefix": "[variables('subnetPrefix')]",
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
}
}
}
]
}
},
{
"apiVersion": "2018-11-01",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('nic1Name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
},
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
},
"subnet": {
"id": "[variables('subnetRef')]"
}
}
}
]
}
},
{
"apiVersion": "2018-10-01",
"type": "Microsoft.Compute/virtualMachines",
"name": "[variables('server1Name')]",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('acceptEula'),'Yes')]",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[concat('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[variables('vmSize')]"
},
"osProfile": {
"computerName": "[variables('server1Name')]",
"adminUsername": "[variables('vmAdminUsername')]",
"adminPassword": "[variables('adminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"timeZone": "[variables('TimezoneId')]"
}
},
"storageProfile": {
"imageReference": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[variables('imageSku')]",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage",
"osType": "Windows",
"name": "[variables('OSDiskName')]",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "[variables('storageAccountType')]"
},
"diskSizeGB": 128
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nic1Name'))]"
}
]
}
},
"resources": [
{
"apiVersion": "2017-04-26-preview",
"type": "microsoft.devtestlab/schedules",
"name": "[concat('shutdown-computevm-',variables('server1Name'))]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/',variables('server1Name'))]"
],
"properties": {
"status": "[variables('AutoShutdown')]",
"taskType": "ComputeVmShutdownTask",
"dailyRecurrence": {
"time": "[variables('AutoShutdownTime')]"
},
"timeZoneId": "[variables('TimezoneId')]",
"notificationSettings": {
"status": "Disabled",
"timeInMinutes": 15
},
"targetResourceId": "[resourceId('Microsoft.Compute/virtualMachines',variables('server1Name'))]"
}
}
]
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('server1Name'),'/vmextension1')]",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('acceptEula'),'Yes')]",
"tags": {
"displayName": "PowerShellScript2"
},
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('server1Name'))]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.9",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[uri(deployment().properties.templateLink.uri, 'initialize.ps1')]"
],
"commandToExecute": "[concat(variables('ScriptCommandToExecute'),'initialize.ps1',' -TemplateLink \"',deployment().properties.templateLink.uri,'\" -hostName \"',reference(variables('publicIPAddressName')).dnsSettings.fqdn,'\" -AcceptInsiderEula \"',variables('AcceptInsiderEula'),'\" -RemoteDesktopAccess \"',variables('RdpAddresses'),'\" -WinRmAccess \"',variables('winRmAddresses'),'\" -Isolation \"',variables('Isolation'),'\" -VMAdminUsername \"',variables('vmAdminUsername'),'\" -NAVAdminUsername \"',variables('navAdminUsername'),'\" -AzureSQLAdminUsername \"',variables('azureSqlAdminUsername'),'\" -AdminPassword \"',replace(variables('adminPassword'),'\"','\\\"'),'\" -artifactUrl \"',variables('artifactUrl'),'\" -navDockerImage \"',variables('navDockerImage'),'\" -registryUsername \"',variables('registryUsername'),'\" -registryPassword \"',replace(variables('registryPassword'),'\"','\\\"'),'\" -LicenseFileUri \"',variables('licenseFileUri'),'\" -SQLServerType \"',variables('SQLServerType'),'\" -AzureSqlServer \"',if(equals(variables('SQLServerType'),'AzureSQL'),variables('azureSqlServerDnsName'),''),'\" -AppBacpacUri \"',variables('AppBacpacUri'),'\" -TenantBacpacUri \"',variables('TenantBacpacUri'),'\" -IncludeAppUris \"',variables('IncludeAppUris'),'\" -CertificatePfxUrl \"',variables('CertificatePfxUrl'),'\" -CertificatePfxPassword \"',replace(variables('CertificatePfxPassword'),'\"','\\\"'),'\" -PublicDnsName \"',variables('PublicDnsName'),'\" -Multitenant \"',variables('Multitenant'),'\" -TestToolkit \"',variables('TestToolkit'),'\" -AssignPremiumPlan \"',variables('AssignPremiumPlan'),'\" -CreateTestUsers \"',variables('CreateTestUsers'),'\" -CreateAadUsers \"',variables('CreateAadUsers'),'\" -EnableSymbolLoading \"',variables('EnableSymbolLoading'),'\" -IncludeCSIDE \"',variables('IncludeCSIDE'),'\" -IncludeAL \"',variables('IncludeAL'),'\" -ClickOnce \"',variables('ClickOnce'),'\" -EnableTaskScheduler \"',variables('EnableTaskScheduler'),'\" -Office365UserName \"',variables('Office365UserName'),'\" -Office365Password \"',replace(variables('Office365Password'),'\"','\\\"'),'\" -BingMapsKey \"',variables('BingMapsKey'),'\" -finalSetupScriptUrl \"',variables('finalSetupScriptUrl'),'\" -RunWindowsUpdate \"',variables('RunWindowsUpdate'),'\" -ContactEMailForLetsEncrypt \"',variables('ContactEMailForLetsEncrypt'),'\" -style \"',variables('style'),'\" -nchbranch \"',variables('nchbranch'),'\" -containerName \"',variables('containerName'),'\" -AddTraefik \"',variables('AddTraefik'),'\"')]"
},
"protectedSettings": {}
}
}
],
"outputs": {
"landingPage": {
"value": "[concat('http://',reference(variables('publicIPAddressName')).dnsSettings.fqdn)]",
"type": "string"
}
}
}