-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.json
1502 lines (1502 loc) · 70.9 KB
/
main.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
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "18278146795939934552"
}
},
"parameters": {
"deploymentParams": {
"type": "object"
},
"rgParams": {
"type": "object"
},
"storageAccountParams": {
"type": "object"
},
"logAnalyticsWorkspaceParams": {
"type": "object"
},
"dceParams": {
"type": "object"
},
"vnetParams": {
"type": "object"
},
"vmParams": {
"type": "object"
},
"brandTags": {
"type": "object"
},
"dateNow": {
"type": "string",
"defaultValue": "[utcNow('yyyy-MM-dd-hh-mm')]"
},
"tags": {
"type": "object",
"defaultValue": "[union(parameters('brandTags'), createObject('last_deployed', parameters('dateNow')))]"
}
},
"variables": {
"location": "[parameters('deploymentParams').location]",
"rgName": "[format('{0}_{1}_{2}', parameters('deploymentParams').enterprise_name, parameters('deploymentParams').enterprise_name_suffix, parameters('deploymentParams').global_uniqueness)]"
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[variables('rgName')]",
"location": "[deployment().location]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {
"rgName": {
"value": "[variables('rgName')]"
},
"location": {
"value": "[variables('location')]"
},
"tags": {
"value": "[parameters('tags')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "2849403298603707197"
}
},
"parameters": {
"location": {
"type": "string",
"defaultValue": "[deployment().location]"
},
"tags": {
"type": "object"
},
"rgName": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2021-04-01",
"name": "[parameters('rgName')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]"
}
],
"outputs": {
"rgName": {
"type": "string",
"value": "[parameters('rgName')]"
},
"rgId": {
"type": "string",
"value": "[subscriptionResourceId('Microsoft.Resources/resourceGroups', parameters('rgName'))]"
},
"stringOutput": {
"type": "string",
"value": "[deployment().name]"
},
"integerOutput": {
"type": "int",
"value": "[length(environment().authentication.audiences)]"
},
"booleanOutput": {
"type": "bool",
"value": "[contains(deployment().name, 'Miztiik')]"
},
"arrayOutput": {
"type": "array",
"value": "[environment().authentication.audiences]"
},
"objectOutput": {
"type": "object",
"value": "[subscription()]"
}
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('{0}_{1}_Sa', parameters('storageAccountParams').storageAccountNamePrefix, parameters('deploymentParams').global_uniqueness)]",
"resourceGroup": "[variables('rgName')]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {
"deploymentParams": {
"value": "[parameters('deploymentParams')]"
},
"storageAccountParams": {
"value": "[parameters('storageAccountParams')]"
},
"tags": {
"value": "[parameters('tags')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "14251004297687213663"
}
},
"parameters": {
"deploymentParams": {
"type": "object"
},
"storageAccountParams": {
"type": "object"
},
"tags": {
"type": "object",
"defaultValue": "[resourceGroup().tags]"
}
},
"variables": {
"uniqStr": "[substring(uniqueString(resourceGroup().id), 0, 6)]",
"saName": "[format('{0}{1}{2}', parameters('storageAccountParams').storageAccountNamePrefix, variables('uniqStr'), parameters('deploymentParams').global_uniqueness)]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2022-05-01",
"name": "[variables('saName')]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"sku": {
"name": "[format('{0}', parameters('storageAccountParams').sku)]"
},
"kind": "[format('{0}', parameters('storageAccountParams').kind)]",
"properties": {
"minimumTlsVersion": "[format('{0}', parameters('storageAccountParams').minimumTlsVersion)]",
"allowBlobPublicAccess": "[parameters('storageAccountParams').allowBlobPublicAccess]",
"supportsHttpsTrafficOnly": true,
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow"
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices",
"apiVersion": "2021-06-01",
"name": "[format('{0}/{1}', variables('saName'), 'default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2021-04-01",
"name": "[format('{0}/{1}/{2}', variables('saName'), 'default', format('{0}-{1}', parameters('storageAccountParams').blobNamePrefix, parameters('deploymentParams').global_uniqueness))]",
"properties": {
"publicAccess": "None"
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('saName'), 'default')]"
]
}
],
"outputs": {
"saName": {
"type": "string",
"value": "[variables('saName')]"
},
"saPrimaryEndpointsBlob": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('saName')), '2022-05-01').primaryEndpoints.blob]"
},
"saPrimaryEndpoints": {
"type": "object",
"value": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('saName')), '2022-05-01').primaryEndpoints]"
},
"blobContainerId": {
"type": "string",
"value": "[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', variables('saName'), 'default', format('{0}-{1}', parameters('storageAccountParams').blobNamePrefix, parameters('deploymentParams').global_uniqueness))]"
},
"blobContainerName": {
"type": "string",
"value": "[format('{0}-{1}', parameters('storageAccountParams').blobNamePrefix, parameters('deploymentParams').global_uniqueness)]"
}
}
}
},
"dependsOn": [
"[subscriptionResourceId('Microsoft.Resources/deployments', variables('rgName'))]"
]
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('{0}_{1}_Vnet', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness)]",
"resourceGroup": "[variables('rgName')]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {
"deploymentParams": {
"value": "[parameters('deploymentParams')]"
},
"vnetParams": {
"value": "[parameters('vnetParams')]"
},
"tags": {
"value": "[parameters('tags')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "14292173456215737540"
}
},
"parameters": {
"deploymentParams": {
"type": "object"
},
"vnetParams": {
"type": "object"
},
"tags": {
"type": "object",
"defaultValue": "[resourceGroup().tags]"
},
"vnetAddPrefixes": {
"type": "object",
"defaultValue": {
"addressPrefixes": [
"10.0.0.0/16"
]
}
},
"webSubnet01Cidr": {
"type": "string",
"defaultValue": "10.0.0.0/24"
},
"webSubnet02Cidr": {
"type": "string",
"defaultValue": "10.0.1.0/24"
},
"appSubnet01Cidr": {
"type": "string",
"defaultValue": "10.0.2.0/24"
},
"appSubnet02Cidr": {
"type": "string",
"defaultValue": "10.0.3.0/24"
},
"dbSubnet01Cidr": {
"type": "string",
"defaultValue": "10.0.4.0/24"
},
"dbSubnet02Cidr": {
"type": "string",
"defaultValue": "10.0.5.0/24"
}
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2021-05-01",
"name": "[format('{0}_Vnet_{1}', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness)]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"properties": {
"addressSpace": "[parameters('vnetAddPrefixes')]",
"subnets": [
{
"name": "webSubnet01",
"properties": {
"addressPrefix": "[parameters('webSubnet01Cidr')]"
}
},
{
"name": "webSubnet02",
"properties": {
"addressPrefix": "[parameters('webSubnet02Cidr')]"
}
},
{
"name": "appSubnet01",
"properties": {
"addressPrefix": "[parameters('appSubnet01Cidr')]"
}
},
{
"name": "appSubnet02",
"properties": {
"addressPrefix": "[parameters('appSubnet02Cidr')]"
}
},
{
"name": "dbSubnet01",
"properties": {
"addressPrefix": "[parameters('dbSubnet01Cidr')]"
}
},
{
"name": "dbSubnet02",
"properties": {
"addressPrefix": "[parameters('dbSubnet02Cidr')]"
}
}
]
}
}
],
"outputs": {
"vnetId": {
"type": "string",
"value": "[resourceId('Microsoft.Network/virtualNetworks', format('{0}_Vnet_{1}', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness))]"
},
"vnetName": {
"type": "string",
"value": "[format('{0}_Vnet_{1}', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness)]"
},
"vnetSubnets": {
"type": "array",
"value": "[reference(resourceId('Microsoft.Network/virtualNetworks', format('{0}_Vnet_{1}', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness)), '2021-05-01').subnets]"
},
"tags": {
"type": "object",
"value": "[parameters('tags')]"
}
}
}
},
"dependsOn": [
"[subscriptionResourceId('Microsoft.Resources/deployments', variables('rgName'))]"
]
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('{0}_{1}_Vm', parameters('vmParams').vmNamePrefix, parameters('deploymentParams').global_uniqueness)]",
"resourceGroup": "[variables('rgName')]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {
"deploymentParams": {
"value": "[parameters('deploymentParams')]"
},
"vmParams": {
"value": "[parameters('vmParams')]"
},
"vnetName": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Vnet', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.vnetName.value]"
},
"saName": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Sa', parameters('storageAccountParams').storageAccountNamePrefix, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.saName.value]"
},
"blobContainerName": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Sa', parameters('storageAccountParams').storageAccountNamePrefix, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.blobContainerName.value]"
},
"saPrimaryEndpointsBlob": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Sa', parameters('storageAccountParams').storageAccountNamePrefix, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.saPrimaryEndpointsBlob.value]"
},
"linDataCollectionEndpointId": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Dce', parameters('dceParams').endpointNamePrefix, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.linDataCollectionEndpointId.value]"
},
"storeEventsDcrId": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Dcr', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.storeEventsDcrId.value]"
},
"automationEventsDcrId": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Dcr', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness)), '2022-09-01').outputs.automationEventsDcrId.value]"
},
"tags": {
"value": "[parameters('tags')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "1534206703587613359"
}
},
"parameters": {
"deploymentParams": {
"type": "object"
},
"vmParams": {
"type": "object"
},
"saName": {
"type": "string"
},
"blobContainerName": {
"type": "string"
},
"saPrimaryEndpointsBlob": {
"type": "string"
},
"tags": {
"type": "object",
"defaultValue": "[resourceGroup().tags]"
},
"vnetName": {
"type": "string"
},
"linDataCollectionEndpointId": {
"type": "string"
},
"storeEventsDcrId": {
"type": "string"
},
"automationEventsDcrId": {
"type": "string"
},
"vmName": {
"type": "string",
"defaultValue": "[format('{0}-{1}', parameters('vmParams').vmNamePrefix, parameters('deploymentParams').global_uniqueness)]"
},
"dnsLabelPrefix": {
"type": "string",
"defaultValue": "[toLower(format('{0}-{1}-{2}', parameters('vmParams').vmNamePrefix, parameters('deploymentParams').global_uniqueness, uniqueString(resourceGroup().id, parameters('vmName'))))]"
},
"publicIpName": {
"type": "string",
"defaultValue": "[format('{0}-{1}-PublicIp', parameters('vmParams').vmNamePrefix, parameters('deploymentParams').global_uniqueness)]"
},
"blobOwnerRoleId": {
"type": "string",
"defaultValue": "b7e6dc6d-f1e8-4753-8033-0f276bb0955b"
},
"blobContributorRoleId": {
"type": "string",
"defaultValue": "ba92f5b4-2d11-453d-a403-e96b0029c9fe"
}
},
"variables": {
"userDataScript": "IyEvYmluL2Jhc2gKIyBzZXQgLWV4CnNldCAteApzZXQgLW8gcGlwZWZhaWwKCiMgdmVyc2lvbjogMTBBcHIyMDIzCgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIyMjIyMjIyMjIyMjICAgICBTRVQgR0xPQkFMUyAgICAgIyMjIyMjIyMjIyMjIyMjIwojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKUkVQT19OQU1FPSJhenVyZS12bS10by1ibG9iLXN0b3JhZ2UiCgpHSVRfUkVQT19VUkw9Imh0dHBzOi8vZ2l0aHViLmNvbS9taXp0aWlrLyRSRVBPX05BTUUuZ2l0IgoKQVBQX0RJUj0iL3Zhci8kUkVQT19OQU1FIgoKTE9HX0ZJTEU9Ii92YXIvbG9nL21penRpaWstYXV0b21hdGlvbi1ib290c3RyYXAtJChkYXRlICsnJVktJW0tJWQnKS5sb2ciCgojIGh0dHBzOi8vbGVhcm4ubWljcm9zb2Z0LmNvbS9lbi11cy9henVyZS92aXJ0dWFsLW1hY2hpbmVzL2xpbnV4L3R1dG9yaWFsLWF1dG9tYXRlLXZtLWRlcGxveW1lbnQKCmluc3RydWN0aW9uKCkKewogIGVjaG8gInVzYWdlOiAuL2J1aWxkLnNoIHBhY2thZ2UgPHN0YWdlPiA8cmVnaW9uPiIKICBlY2hvICIiCiAgZWNobyAiL2J1aWxkLnNoIGRlcGxveSA8c3RhZ2U+IDxyZWdpb24+IDxwa2dfZGlyPiIKICBlY2hvICIiCiAgZWNobyAiL2J1aWxkLnNoIHRlc3QtPHRlc3RfdHlwZT4gPHN0YWdlPiIKfQoKZWNob2Vycm9yKCkgewogICAgcHJpbnRmICIke1JDfSAqIEVSUk9SJHtFQ306ICRAXG4iIDE+JjI7Cn0KCmFzc3VtZV9yb2xlKCkgewogIGlmIFsgLW4gIiRERVBMT1lFUl9ST0xFX0FSTiIgXTsgdGhlbgogICAgZWNobyAiQXNzdW1pbmcgcm9sZSAkREVQTE9ZRVJfUk9MRV9BUk4gLi4uIgogIGZpCn0KCnVuYXNzdW1lX3JvbGUoKSB7CiAgdW5zZXQgVE9LRU4KfQoKZnVuY3Rpb24gY2xvbmVfZ2l0X3JlcG8oKXsKICBlY2hvICJDbG9uaW5nIFJlcG8iCiAgICAjIG1rZGlyIC1wIC92YXIvCiAgICBjZCAvdmFyCiAgICBnaXQgY2xvbmUgJEdJVF9SRVBPX1VSTAogICAgY2QgL3Zhci8kUkVQT19OQU1FCn0KCmZ1bmN0aW9uIGFkZF9lbnZfdmFycygpewogICAgSU1EUz1gY3VybCAtcyAtSCBNZXRhZGF0YTp0cnVlIC0tbm9wcm94eSAiKiIgImh0dHA6Ly8xNjkuMjU0LjE2OS4yNTQvbWV0YWRhdGEvaW5zdGFuY2U/YXBpLXZlcnNpb249MjAyMS0wMi0wMSJgCiAgICBkZWNsYXJlIC1nIFVTRVJfREFUQV9TQ1JJUFQ9YGN1cmwgLUggTWV0YWRhdGE6dHJ1ZSAtLW5vcHJveHkgIioiICJodHRwOi8vMTY5LjI1NC4xNjkuMjU0L21ldGFkYXRhL2luc3RhbmNlL2NvbXB1dGUvdXNlckRhdGE/YXBpLXZlcnNpb249MjAyMS0wMS0wMSZmb3JtYXQ9dGV4dCIgfCBiYXNlNjQgLS1kZWNvZGVgCn0KCmZ1bmN0aW9uIGluc3RhbGxfbGlic19vbl91YnVudHUoKXsKICBlY2hvICJJbnN0YWxsaW5nIEF6dXJlIENMSSIKICBlY2hvICJJbnN0YWxsaW5nIEF6dXJlIENMSSIgPiAvdmFyL2xvZy9taXp0aWlrX2NsaV9pbnN0YWxsLmxvZwogICMgaHR0cHM6Ly9sZWFybi5taWNyb3NvZnQuY29tL2VuLXVzL2NsaS9henVyZS9pbnN0YWxsLWF6dXJlLWNsaS1saW51eD9waXZvdHM9YXB0CiAgY3VybCAtc0wgaHR0cHM6Ly9ha2EubXMvSW5zdGFsbEF6dXJlQ0xJRGViIHwgc3VkbyBiYXNoCgogICMgSW5pdGlhdGUgYXogbG9naW4KIAogIGF6IGNvbmZpZyBzZXQgZXh0ZW5zaW9uLnVzZV9keW5hbWljX2luc3RhbGw9eWVzX3dpdGhvdXRfcHJvbXB0CiAgYXogbG9naW4gLS1pZGVudGl0eQoKICBlY2hvICJJbnN0YWxsaW5nIFB5dGhvbiBMaWJzIgogIHN1ZG8gYXB0LWdldCAteSBpbnN0YWxsIGpxCiAgc3VkbyBhcHQtZ2V0IC15IGluc3RhbGwgZ2l0CiAgc3VkbyBhcHQtZ2V0IC15IGluc3RhbGwgcHl0aG9uMy1waXAKICBwaXAgaW5zdGFsbCBhenVyZS1zdG9yYWdlLWJsb2IgYXp1cmUtaWRlbnRpdHkKfQoKZnVuY3Rpb24gaW5zdGFsbF9saWJzKCl7CiAgICAjIFByZXBhcmUgdGhlIHNlcnZlciBmb3IgcHl0aG9uMwogICAgc3VkbyB5dW0gLXkgaW5zdGFsbCBnaXQganEKICAgIHN1ZG8geXVtIC15IGluc3RhbGwgcHl0aG9uMy1waXAKICAgIHN1ZG8geXVtIC15IGluc3RhbGwgcHl0aG9uMyAKfQoKZnVuY3Rpb24gaW5zdGFsbF9ub2RlanMoKXsKICAgIGN1cmwgLW8tIGh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9udm0tc2gvbnZtL3YwLjM0LjAvaW5zdGFsbC5zaCB8IGJhc2gKICAgIC4gfi8ubnZtL252bS5zaAogICAgbnZtIGluc3RhbGwgbm9kZQogICAgbm9kZSAtZSAiY29uc29sZS5sb2coJ1J1bm5pbmcgTm9kZS5qcyAnICsgcHJvY2Vzcy52ZXJzaW9uKSIKfQoKZnVuY3Rpb24gY2hlY2tfZXhlY3V0aW9uKCl7CiAgICBlY2hvICJoZWxsbyIgPi92YXIvbG9nL21penRpaWsubG9nCn0KCmNoZWNrX2V4ZWN1dGlvbiAgICAgICAgICAgICAgICAgfCB0ZWUgLWEgIiR7TE9HX0ZJTEV9IgppbnN0YWxsX2xpYnNfb25fdWJ1bnR1ICAgICAgICAgIHwgdGVlIC1hICIke0xPR19GSUxFfSIKY2xvbmVfZ2l0X3JlcG8gICAgICAgICAgICAgICAgICB8IHRlZSAtYSAiJHtMT0dfRklMRX0iCgoKCg==",
"LinuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publickeys": [
{
"path": "[format('/home/{0}/.ssh/authorized_keys', parameters('vmParams').adminUsername)]",
"keyData": "[parameters('vmParams').adminPassword]"
}
]
}
},
"conditionStr1": "[format('((!(ActionMatches{{''Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read''}}) AND !(ActionMatches{{''Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write''}}) ) OR (@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:name] StringEquals ''{0}''))', parameters('blobContainerName'))]"
},
"resources": [
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2022-05-01",
"name": "[parameters('publicIpName')]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"sku": {
"name": "[parameters('vmParams').publicIpSku]"
},
"properties": {
"publicIPAllocationMethod": "[parameters('vmParams').publicIPAllocationMethod]",
"publicIPAddressVersion": "IPv4",
"deleteOption": "Delete",
"dnsSettings": {
"domainNameLabel": "[parameters('dnsLabelPrefix')]"
}
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2021-05-01",
"name": "webSg",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"properties": {
"securityRules": [
{
"name": "AllowInboundSsh",
"properties": {
"priority": 250,
"protocol": "Tcp",
"access": "Allow",
"direction": "Inbound",
"sourceAddressPrefix": "*",
"sourcePortRange": "*",
"destinationAddressPrefix": "*",
"destinationPortRange": "22"
}
},
{
"name": "HTTP",
"properties": {
"priority": 200,
"protocol": "Tcp",
"access": "Allow",
"direction": "Inbound",
"sourceAddressPrefix": "*",
"sourcePortRange": "*",
"destinationAddressPrefix": "*",
"destinationPortRange": "80"
}
},
{
"name": "Outbound_Allow_All",
"properties": {
"priority": 300,
"protocol": "*",
"access": "Allow",
"direction": "Outbound",
"sourceAddressPrefix": "*",
"sourcePortRange": "*",
"destinationAddressPrefix": "*",
"destinationPortRange": "*"
}
},
{
"name": "AzureResourceManager",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "AzureResourceManager",
"access": "Allow",
"priority": 160,
"direction": "Outbound"
}
},
{
"name": "AzureStorageAccount",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "[format('Storage.{0}', parameters('deploymentParams').location)]",
"access": "Allow",
"priority": 170,
"direction": "Outbound"
}
},
{
"name": "AzureFrontDoor",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "AzureFrontDoor.FrontEnd",
"access": "Allow",
"priority": 180,
"direction": "Outbound"
}
}
]
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2022-05-01",
"name": "[format('{0}-Nic-01', parameters('vmName'))]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('vmParams').vmSubnetName)]"
},
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName'))]"
}
}
}
],
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', 'webSg')]"
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', 'webSg')]"
]
},
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities",
"apiVersion": "2023-01-31",
"name": "[format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness)]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]"
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"scope": "[format('Microsoft.Storage/storageAccounts/{0}/blobServices/{1}/containers/{2}', split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[0], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[1], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[2])]",
"name": "[guid('r_attachBlobContributorPermsToRole', resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness)), parameters('blobOwnerRoleId'))]",
"properties": {
"description": "Blob Contributor Permission to ResourceGroup scope",
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', parameters('blobOwnerRoleId'))]",
"principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness)), '2023-01-31').principalId]",
"conditionVersion": "2.0",
"condition": "[variables('conditionStr1')]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[0], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[1], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[2])]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2021-04-01",
"name": "[format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName'))]"
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"scope": "[format('Microsoft.Storage/storageAccounts/{0}/blobServices/{1}/containers/{2}', split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[0], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[1], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[2])]",
"name": "[guid('r_attachBlobDataPermsToRole', resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness)), parameters('blobOwnerRoleId'))]",
"properties": {
"description": "Blob Contributor Permission to Resource scope",
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', parameters('blobContributorRoleId'))]",
"principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness)), '2023-01-31').principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[0], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[1], split(format('{0}/default/{1}', parameters('saName'), parameters('blobContainerName')), '/')[2])]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness))]"
]
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2022-03-01",
"name": "[parameters('vmName')]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"[format('{0}', resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness)))]": {}
}
},
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmParams').vmSize]"
},
"osProfile": {
"computerName": "[parameters('vmName')]",
"adminUsername": "[parameters('vmParams').adminUsername]",
"adminPassword": "[parameters('vmParams').adminPassword.secureString]",
"linuxConfiguration": "[if(equals(parameters('vmParams').authType, 'password'), null(), variables('LinuxConfiguration'))]"
},
"storageProfile": {
"imageReference": "[if(equals(parameters('vmParams').isUbuntu, true()), createObject('publisher', 'Canonical', 'offer', '0001-com-ubuntu-server-jammy', 'sku', '22_04-lts-gen2', 'version', 'latest'), createObject('publisher', 'RedHat', 'offer', 'RHEL', 'sku', '91-gen2', 'version', 'latest'))]",
"osDisk": {
"createOption": "FromImage",
"name": "[format('{0}_osDisk', parameters('vmName'))]",
"caching": "ReadWrite",
"deleteOption": "Delete",
"diskSizeGB": 128,
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
}
},
"dataDisks": [
{
"createOption": "Empty",
"name": "[format('{0}-DataDisk', parameters('vmName'))]",
"caching": "ReadWrite",
"deleteOption": "Delete",
"lun": 13,
"diskSizeGB": 2,
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
}
}
]
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', format('{0}-Nic-01', parameters('vmName')))]"
}
]
},
"securityProfile": {},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[parameters('saPrimaryEndpointsBlob')]"
}
},
"userData": "[variables('userDataScript')]"
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', format('{0}-Nic-01', parameters('vmName')))]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness))]"
]
},
{
"condition": "[parameters('vmParams').isLinux]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2021-07-01",
"name": "[format('{0}/{1}', parameters('vmName'), 'AzureMonitorLinuxAgent')]",
"location": "[parameters('deploymentParams').location]",
"properties": {
"publisher": "Microsoft.Azure.Monitor",
"type": "AzureMonitorLinuxAgent",
"enableAutomaticUpgrade": true,
"autoUpgradeMinorVersion": true,
"typeHandlerVersion": "1.25",
"settings": {
"identifier-name": "mi_res_id",
"identifier-value": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness))]"
}
},
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness))]"
]
},
{
"type": "Microsoft.Insights/dataCollectionRuleAssociations",
"apiVersion": "2021-09-01-preview",
"scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('vmName'))]",
"name": "configurationAccessEndpoint",
"properties": {
"dataCollectionEndpointId": "[parameters('linDataCollectionEndpointId')]",
"description": "Send Custom logs to DCR"
},
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]"
]
},
{
"type": "Microsoft.Insights/dataCollectionRuleAssociations",
"apiVersion": "2021-09-01-preview",
"scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('vmName'))]",
"name": "[format('{0}_storeEventsDcr_{1}', parameters('vmName'), parameters('deploymentParams').global_uniqueness)]",
"properties": {
"dataCollectionRuleId": "[parameters('storeEventsDcrId')]",
"description": "Send Application Logs to DCR"
},
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]"
]
},
{
"type": "Microsoft.Insights/dataCollectionRuleAssociations",
"apiVersion": "2021-09-01-preview",
"scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('vmName'))]",
"name": "[format('{0}_automationEvents_{1}', parameters('vmName'), parameters('deploymentParams').global_uniqueness)]",
"properties": {
"dataCollectionRuleId": "[parameters('automationEventsDcrId')]",
"description": "Send Automation Logs to DCR"
},
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]"
]
},
{
"condition": "[parameters('vmParams').isWindows]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2021-11-01",
"name": "[format('{0}/{1}', parameters('vmName'), 'AzureMonitorWindowsAgent')]",
"location": "[parameters('deploymentParams').location]",
"properties": {
"publisher": "Microsoft.Azure.Monitor",
"type": "AzureMonitorWindowsAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": true
},
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]"
]
}
],
"outputs": {
"webGenHostName": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName')), '2022-05-01').dnsSettings.fqdn]"
},
"adminUsername": {
"type": "string",
"value": "[parameters('vmParams').adminUsername]"
},
"sshCommand": {
"type": "string",
"value": "[format('ssh {0}@{1}', parameters('vmParams').adminUsername, reference(resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName')), '2022-05-01').dnsSettings.fqdn)]"
},
"webGenHostId": {
"type": "string",
"value": "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]"
},
"webGenHostPrivateIP": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Network/networkInterfaces', format('{0}-Nic-01', parameters('vmName'))), '2022-05-01').ipConfigurations[0].properties.privateIPAddress]"
},
"vmIdentityId": {
"type": "string",
"value": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}_{1}_Identity', parameters('vmName'), parameters('deploymentParams').global_uniqueness))]"
}
}
}
},
"dependsOn": [
"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Dce', parameters('dceParams').endpointNamePrefix, parameters('deploymentParams').global_uniqueness))]",
"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Dcr', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness))]",
"[subscriptionResourceId('Microsoft.Resources/deployments', variables('rgName'))]",
"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Sa', parameters('storageAccountParams').storageAccountNamePrefix, parameters('deploymentParams').global_uniqueness))]",
"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', format('{0}_{1}_Vnet', parameters('vnetParams').vnetNamePrefix, parameters('deploymentParams').global_uniqueness))]"
]
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('{0}_{1}_La', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness)]",
"resourceGroup": "[variables('rgName')]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {
"deploymentParams": {
"value": "[parameters('deploymentParams')]"
},
"logAnalyticsWorkspaceParams": {
"value": "[parameters('logAnalyticsWorkspaceParams')]"
},
"tags": {
"value": "[parameters('tags')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "6532514839441292738"
}
},
"parameters": {
"deploymentParams": {
"type": "object"
},
"logAnalyticsWorkspaceParams": {
"type": "object"
},
"tags": {
"type": "object",
"defaultValue": "[resourceGroup().tags]"
}
},
"resources": [
{
"condition": "[equals(parameters('logAnalyticsWorkspaceParams').commitTier, false())]",
"type": "Microsoft.OperationalInsights/workspaces",
"apiVersion": "2020-08-01",
"name": "[format('{0}-payGTier-{1}', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness)]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"properties": {
"retentionInDays": "[parameters('logAnalyticsWorkspaceParams').retentionInDays]",
"sku": {
"name": "PerGB2018"
},
"workspaceCapping": {
"dailyQuotaGb": "[parameters('logAnalyticsWorkspaceParams').dailyQuotaGb]"
},
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled"
}
},
{
"condition": "[equals(parameters('logAnalyticsWorkspaceParams').commitTier, true())]",
"type": "Microsoft.OperationalInsights/workspaces",
"apiVersion": "2022-10-01",
"name": "[format('{0}-commitTier-{1}', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness)]",
"location": "[parameters('deploymentParams').location]",
"tags": "[parameters('tags')]",
"properties": {
"sku": {
"name": "CapacityReservation",
"capacityReservationLevel": 100
}
}
},
{
"type": "Microsoft.OperationalInsights/workspaces/tables",
"apiVersion": "2022-10-01",
"name": "[format('{0}/{1}', format('{0}-payGTier-{1}', parameters('logAnalyticsWorkspaceParams').workspaceName, parameters('deploymentParams').global_uniqueness), format('{0}{1}_CL', parameters('logAnalyticsWorkspaceParams').storeEventsCustomTableName, parameters('deploymentParams').global_uniqueness))]",
"properties": {
"plan": "Analytics",
"retentionInDays": -1,
"schema": {
"description": "Store order events custom table",
"displayName": "DOESNT-SEEM-TO-WORK-STORE-EVENTS",
"name": "[format('{0}{1}_CL', parameters('logAnalyticsWorkspaceParams').storeEventsCustomTableName, parameters('deploymentParams').global_uniqueness)]",
"columns": [
{
"name": "TimeGenerated",
"type": "datetime"
},
{
"name": "RawData",
"type": "string"
},
{
"name": "request_id",
"type": "string"
},
{
"name": "event_type",
"type": "string"
},
{
"name": "store_id",
"displayName": "store_id",
"description": "The Id of the store placing the Order",
"type": "int"
},
{
"name": "cust_id",