-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcore.bicep
More file actions
1947 lines (1728 loc) · 74 KB
/
core.bicep
File metadata and controls
1947 lines (1728 loc) · 74 KB
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
import { resourceGroupScope } from './helpers.bicep'
import { modelDeploymentInfo, raiPolicyInfo } from './ai_ml/ai-services.bicep'
import { identityInfo } from './security/managed-identity.bicep'
import { vnetConfigInfo } from './containers/container-apps-environment.bicep'
targetScope = 'subscription'
@description('Environment name used as a tag for all resources. This is directly mapped to the azd-environment.')
param environmentName string = ''
@minLength(1)
@maxLength(48)
@description('Name of the workload which is used to generate a short unique hash used in all resources.')
param workloadName string
@minLength(1)
@description('Primary location for all resources.')
param location string
@description('Tags for all resources. Define your tagging strategy using https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-tagging.')
param tags object = {
'azd-env-name': environmentName
WorkloadName: workloadName
Environment: 'Dev'
}
@description('Name of the application. Defaults to ai-document-pipeline.')
param applicationName string = 'ai-document-pipeline'
@description('Configuration for Azure resources to reuse for the deployment.')
param azureReuseConfig object = {}
@description('Name of the Resource Group to deploy the resources. If left empty, a name will be generated using Azure CAF best practices.')
param resourceGroupName string = ''
@description('Principal ID of the user to assign roles to. This is used for the role assignments in the resource group and other resources.')
param principalId string = ''
@description('Identities to assign roles to.')
param identities identityInfo[] = union([], [
{
principalId: principalId
principalType: 'User'
}
])
@description('Whether to deploy the resources in a network isolated environment. Defaults to false.')
param networkIsolation bool = false
@description('Whether to deploy the VPN gateway to access the network isolated environment in the zero trust configuration. Defaults to false.')
param deployVPN bool = false
@description('Name of the VPN Gateway. If left empty, a name will be generated using Azure CAF best practices.')
param vpnGatewayName string = ''
@description('Name of the VPN Gateway public IP address. If left empty, a name will be generated using Azure CAF best practices.')
param vpnGatewayPublicIpName string = ''
@description('Whether to deploy the Bastion host VM to access the network isolated environment in the zero trust configuration. Defaults to true.')
param deployVM bool = true
@description('Name of the Bastion host VM. If left empty, a name will be generated using Azure CAF best practices.')
param vmName string = ''
@description('Username for the Bastion host VM when deploying with networkIsolation true.')
param vmUserName string?
@minLength(6)
@maxLength(72)
@description('User password for the Bastion host VM when deploying with networkIsolation true. Password must satisfy at least 3 of password complexity requirements from the following: 1-Contains an uppercase character, 2-Contains a lowercase character, 3-Contains a numeric digit, 4-Contains a special character, 5- Control characters are not allowed.')
@secure()
param vmUserInitialPassword string?
@description('Name of the Key Vault secret to store the VM user password. Defaults to vmUserInitialPassword.')
param vmUserPasswordKeyVaultSecretName string = 'vmUserInitialPassword'
@description('Name of the Virtual Network to deploy the resources. If left empty, a name will be generated using Azure CAF best practices.')
param vnetName string = ''
@description('Address space for the Virtual Network. Defaults to 10.0.0.0/23.')
param vnetAddress string = '10.0.0.0/23'
@description('Name of the network security group for the AI services. If left empty, a name will be generated using Azure CAF best practices.')
param aiNsgName string = ''
@description('Name of the subnet for the AI services. If left empty, a name will be generated using Azure CAF best practices.')
param aiSubnetName string = ''
@description('Address prefix for the AI services subnet. Defaults to 10.0.0.0/26.')
param aiSubnetPrefix string = '10.0.0.0/26'
@description('Name of the network security group for the Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
param acaNsgName string = ''
@description('Name of the subnet for the Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
param acaSubnetName string = ''
@description('Address prefix for the Azure Container Apps environment subnet. Defaults to 10.0.1.64/26.')
param acaSubnetPrefix string = '10.0.1.64/26'
@description('Name of the network security group for the Bastion host VM. If left empty, a name will be generated using Azure CAF best practices.')
param bastionNsgName string = ''
@description('Name of the Key Vault to store Bastion host VM secrets. If left empty, a name will be generated using Azure CAF best practices.')
param bastionKeyVaultName string = ''
@description('Address prefix for the Bastion host VM subnet. Defaults to 10.0.0.64/26.')
param bastionSubnetPrefix string = '10.0.0.64/26'
@description('Name of the network security group for the Azure Cosmos DB. If left empty, a name will be generated using Azure CAF best practices.')
param databaseNsgName string = ''
@description('Name of the subnet for Azure Cosmos DB. If left empty, a name will be generated using Azure CAF best practices.')
param databaseSubnetName string = ''
@description('Address prefix for the Azure Cosmos DB subnet. Defaults to 10.0.1.0/26.')
param databaseSubnetPrefix string = '10.0.1.0/26'
@description('Name of the Private Endpoint for Azure Storage Blob Service. If left empty, a name will be generated using Azure CAF best practices.')
param azureBlobStorageAccountPe string = ''
@description('Name of the Private Endpoint for Azure Storage Table Service. If left empty, a name will be generated using Azure CAF best practices.')
param azureTableStorageAccountPe string = ''
@description('Name of the Private Endpoint for Azure Storage Queue Service. If left empty, a name will be generated using Azure CAF best practices.')
param azureQueueStorageAccountPe string = ''
@description('Name of the Private Endpoint for Azure Storage File Service. If left empty, a name will be generated using Azure CAF best practices.')
param azureFileStorageAccountPe string = ''
@description('Name of the Private Endpoint for Azure Cosmos DB. If left empty, a name will be generated using Azure CAF best practices.')
param azureCosmosDbAccountPe string = ''
@description('Name of the Private Endpoint for Azure Key Vault. If left empty, a name will be generated using Azure CAF best practices.')
param keyVaultPe string = ''
@description('Name of the Private Endpoint for Azure App Configuration. If left empty, a name will be generated using Azure CAF best practices.')
param appConfigPe string = ''
@description('Name of the Private Link for Azure Monitor. If left empty, a name will be generated using Azure CAF best practices.')
param azureMonitorPrivateLinkName string = ''
@description('Name of the Private Endpoint for Log Analytics Workspace. If left empty, a name will be generated using Azure CAF best practices.')
param logAnalyticsPe string = ''
@description('Name of the Log Analytics Workspace to store logs and metrics. If left empty, a name will be generated using Azure CAF best practices.')
param logAnalyticsWorkspaceName string = ''
@description('Name of the Application Insights instance to monitor the application. If left empty, a name will be generated using Azure CAF best practices.')
param applicationInsightsName string = ''
@description('Name of the Private Endpoint for Azure AI Services. If left empty, a name will be generated using Azure CAF best practices.')
param aiServicesPe string = ''
@description('Name of the Private Endpoint for Azure Container Registry. If left empty, a name will be generated using Azure CAF best practices.')
param containerRegistryPe string = ''
@description('Name of the Azure Container Registry to store application images. If left empty, a name will be generated using Azure CAF best practices.')
param containerRegistryName string = ''
@description('Name of the Azure Container Apps environment to deploy the application. If left empty, a name will be generated using Azure CAF best practices.')
param containerAppsEnvironmentName string = ''
@description('Name of the Private Endpoint for Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
param containerAppsEnvironmentPe string = ''
@description('Name of the App Configuration Store to store application settings. If left empty, a name will be generated using Azure CAF best practices.')
param appConfigName string = ''
@description('Whether to deploy app config values to Azure App Configuration. Defaults to true.')
param deployAppConfigValues bool = true
@description('Name of the Azure Cosmos DB account to store application data. If left empty, a name will be generated using Azure CAF best practices.')
param azureCosmosDbName string = ''
@description('Name of the Azure Cosmos DB database to create in the account. If left empty, a name will be generated using Azure CAF best practices.')
param azureCosmosDatabaseName string = ''
@description('Name of the Azure AI services instance. If left empty, a name will be generated using Azure CAF best practices.')
param aiServicesName string = ''
@description('Name of the Azure OpenAI completion model for the application. Default is gpt-4o.')
param chatModelDeploymentModel string = 'gpt-4o'
@description('Model deployment for Azure OpenAI chat completion.')
param chatModelDeployment modelDeploymentInfo = {
name: chatModelDeploymentModel
model: { format: 'OpenAI', name: 'gpt-4o', version: '2024-11-20' }
sku: { name: 'GlobalStandard', capacity: 10 }
raiPolicyName: workloadName
versionUpgradeOption: 'OnceCurrentVersionExpired'
}
@description('Responsible AI policies for the Azure AI Services instance.')
param raiPolicies raiPolicyInfo[] = [
{
name: workloadName
mode: 'Blocking'
prompt: {}
completion: {}
}
]
@description('API version for the Azure OpenAI Service. Defaults to 2025-03-01-preview.')
param openaiApiVersion string = '2025-03-01-preview'
@description('Name of the Azure Storage account to store application data. If left empty, a name will be generated using Azure CAF best practices.')
param storageAccountName string = ''
@description('Name of the Azure Storage blob container to store documents to process. Defaults to documents.')
param storageContainerName string = 'documents'
@description('Name of the Azure Key Vault to store application secrets. If left empty, a name will be generated using Azure CAF best practices.')
param keyVaultName string = ''
@description('Name of the Private Endpoint for Azure AI Foundry Hub. If left empty, a name will be generated using Azure CAF best practices.')
param aiHubPe string = ''
@description('Name of the Azure AI Foundry Hub to manage resources for AI projects. If left empty, a name will be generated using Azure CAF best practices.')
param aiHubName string = ''
@description('Name of the Azure AI Foundry Hub project to build, test, and deploy AI capabilities. If left empty, a name will be generated using Azure CAF best practices.')
param aiHubProjectName string = ''
// Variables
@description('Map of Azure cloud environments to their respective audience IDs.')
var audienceMap = {
AzureCloud: '41b23e61-6c1e-4545-b367-cd054e0ed4b4'
AzureUSGovernment: '51bb15d4-3a4f-4ebf-9dca-40096fe32426'
AzureGermanCloud: '538ee9e6-310a-468d-afef-ea97365856a9'
AzureChinaCloud: '49f817b6-84ae-4cc0-928c-73f27289b3aa'
}
@description('Tenant ID for the Azure subscription being deployed to.')
var tenantId = subscription().tenantId
@description('The Azure cloud environment in which the deployment is taking place.')
var cloud = environment().name
@description('The audience ID for the Azure cloud environment.')
var audience = audienceMap[cloud]
@description('The login endpoint for the Azure cloud environment.')
var tenant = uri(environment().authentication.loginEndpoint, tenantId)
@description('The issuer URL for the Azure cloud environment.')
var issuer = 'https://sts.windows.net/${tenantId}/'
@description('List of recommended abbreviation prefixes for resources, as defined in https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations.')
var abbrs = loadJsonContent('./abbreviations.json')
@description('List of built-in roles for Azure resources, as defined in https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles.')
var roles = loadJsonContent('./roles.json')
@description('Resource token for the workload, used to generate unique names for shared resources.')
var resourceToken = toLower(uniqueString(subscription().id, workloadName, location))
@description('Default configuration for Azure resources to reuse for the deployment.')
var azureReuseConfigDefaults = {
containerRegistryReuse: false
existingContainerRegistryResourceGroupName: ''
existingContainerRegistryName: ''
logAnalyticsWorkspaceReuse: false
existingLogAnalyticsWorkspaceResourceGroupName: ''
existingLogAnalyticsWorkspaceName: ''
appInsightsReuse: false
existingAppInsightsResourceGroupName: ''
existingAppInsightsName: ''
aiServicesReuse: false
existingAiServicesResourceGroupName: ''
existingAiServicesName: ''
cosmosDbReuse: false
existingCosmosDbResourceGroupName: ''
existingCosmosDbAccountName: ''
existingCosmosDbDatabaseName: ''
keyVaultReuse: false
existingKeyVaultResourceGroupName: ''
existingKeyVaultName: ''
storageReuse: false
existingStorageResourceGroupName: ''
existingStorageName: ''
vnetReuse: false
existingVnetResourceGroupName: ''
existingVnetName: ''
appConfigReuse: false
existingAppConfigResourceGroupName: ''
existingAppConfigName: ''
containerAppsEnvironmentReuse: false
existingContainerAppsEnvironmentResourceGroupName: ''
existingContainerAppsEnvironmentName: ''
aiHubReuse: false
existingAiHubResourceGroupName: ''
existingAiHubName: ''
existingAiHubProjectName: ''
}
@description('Configuration for Azure resources to reuse for the deployment.')
var _azureReuseConfig = union(azureReuseConfigDefaults, {
containerRegistryReuse: (empty(azureReuseConfig.containerRegistryReuse)
? azureReuseConfigDefaults.containerRegistryReuse
: toLower(azureReuseConfig.containerRegistryReuse) == 'true')
existingContainerRegistryResourceGroupName: (empty(azureReuseConfig.existingContainerRegistryResourceGroupName)
? azureReuseConfigDefaults.existingContainerRegistryResourceGroupName
: azureReuseConfig.existingContainerRegistryResourceGroupName)
existingContainerRegistryName: (empty(azureReuseConfig.existingContainerRegistryName)
? azureReuseConfigDefaults.existingContainerRegistryName
: azureReuseConfig.existingContainerRegistryName)
logAnalyticsWorkspaceReuse: (empty(azureReuseConfig.logAnalyticsWorkspaceReuse)
? azureReuseConfigDefaults.logAnalyticsWorkspaceReuse
: toLower(azureReuseConfig.logAnalyticsWorkspaceReuse) == 'true')
existingLogAnalyticsWorkspaceResourceGroupName: (empty(azureReuseConfig.existingLogAnalyticsWorkspaceResourceGroupName)
? azureReuseConfigDefaults.existingLogAnalyticsWorkspaceResourceGroupName
: azureReuseConfig.existingLogAnalyticsWorkspaceResourceGroupName)
existingLogAnalyticsWorkspaceName: (empty(azureReuseConfig.existingLogAnalyticsWorkspaceName)
? azureReuseConfigDefaults.existingLogAnalyticsWorkspaceName
: azureReuseConfig.existingLogAnalyticsWorkspaceName)
appInsightsReuse: (empty(azureReuseConfig.appInsightsReuse)
? azureReuseConfigDefaults.appInsightsReuse
: toLower(azureReuseConfig.appInsightsReuse) == 'true')
existingAppInsightsResourceGroupName: (empty(azureReuseConfig.existingAppInsightsResourceGroupName)
? azureReuseConfigDefaults.existingAppInsightsResourceGroupName
: azureReuseConfig.existingAppInsightsResourceGroupName)
existingAppInsightsName: (empty(azureReuseConfig.existingAppInsightsName)
? azureReuseConfigDefaults.existingAppInsightsName
: azureReuseConfig.existingAppInsightsName)
aiServicesReuse: (empty(azureReuseConfig.aiServicesReuse)
? azureReuseConfigDefaults.aiServicesReuse
: toLower(azureReuseConfig.aiServicesReuse) == 'true')
existingAiServicesResourceGroupName: (empty(azureReuseConfig.existingAiServicesResourceGroupName)
? azureReuseConfigDefaults.existingAiServicesResourceGroupName
: azureReuseConfig.existingAiServicesResourceGroupName)
existingAiServicesName: (empty(azureReuseConfig.existingAiServicesName)
? azureReuseConfigDefaults.existingAiServicesName
: azureReuseConfig.existingAiServicesName)
cosmosDbReuse: (empty(azureReuseConfig.cosmosDbReuse)
? azureReuseConfigDefaults.cosmosDbReuse
: toLower(azureReuseConfig.cosmosDbReuse) == 'true')
existingCosmosDbResourceGroupName: (empty(azureReuseConfig.existingCosmosDbResourceGroupName)
? azureReuseConfigDefaults.existingCosmosDbResourceGroupName
: azureReuseConfig.existingCosmosDbResourceGroupName)
existingCosmosDbAccountName: (empty(azureReuseConfig.existingCosmosDbAccountName)
? azureReuseConfigDefaults.existingCosmosDbAccountName
: azureReuseConfig.existingCosmosDbAccountName)
existingCosmosDbDatabaseName: (empty(azureReuseConfig.existingCosmosDbDatabaseName)
? azureReuseConfigDefaults.existingCosmosDbDatabaseName
: azureReuseConfig.existingCosmosDbDatabaseName)
keyVaultReuse: (empty(azureReuseConfig.keyVaultReuse)
? azureReuseConfigDefaults.keyVaultReuse
: toLower(azureReuseConfig.keyVaultReuse) == 'true')
existingKeyVaultResourceGroupName: (empty(azureReuseConfig.existingKeyVaultResourceGroupName)
? azureReuseConfigDefaults.existingKeyVaultResourceGroupName
: azureReuseConfig.existingKeyVaultResourceGroupName)
existingKeyVaultName: (empty(azureReuseConfig.existingKeyVaultName)
? azureReuseConfigDefaults.existingKeyVaultName
: azureReuseConfig.existingKeyVaultName)
storageReuse: (empty(azureReuseConfig.storageReuse)
? azureReuseConfigDefaults.storageReuse
: toLower(azureReuseConfig.storageReuse) == 'true')
existingStorageResourceGroupName: (empty(azureReuseConfig.existingStorageResourceGroupName)
? azureReuseConfigDefaults.existingStorageResourceGroupName
: azureReuseConfig.existingStorageResourceGroupName)
existingStorageName: (empty(azureReuseConfig.existingStorageName)
? azureReuseConfigDefaults.existingStorageName
: azureReuseConfig.existingStorageName)
vnetReuse: (empty(azureReuseConfig.vnetReuse)
? azureReuseConfigDefaults.vnetReuse
: toLower(azureReuseConfig.vnetReuse) == 'true')
existingVnetResourceGroupName: (empty(azureReuseConfig.existingVnetResourceGroupName)
? azureReuseConfigDefaults.existingVnetResourceGroupName
: azureReuseConfig.existingVnetResourceGroupName)
existingVnetName: (empty(azureReuseConfig.existingVnetName)
? azureReuseConfigDefaults.existingVnetName
: azureReuseConfig.existingVnetName)
appConfigReuse: (empty(azureReuseConfig.appConfigReuse)
? azureReuseConfigDefaults.appConfigReuse
: toLower(azureReuseConfig.appConfigReuse) == 'true')
existingAppConfigResourceGroupName: (empty(azureReuseConfig.existingAppConfigResourceGroupName)
? azureReuseConfigDefaults.existingAppConfigResourceGroupName
: azureReuseConfig.existingAppConfigResourceGroupName)
existingAppConfigName: (empty(azureReuseConfig.existingAppConfigName)
? azureReuseConfigDefaults.existingAppConfigName
: azureReuseConfig.existingAppConfigName)
containerAppsEnvironmentReuse: (empty(azureReuseConfig.containerAppsEnvironmentReuse)
? azureReuseConfigDefaults.containerAppsEnvironmentReuse
: toLower(azureReuseConfig.containerAppsEnvironmentReuse) == 'true')
existingContainerAppsEnvironmentResourceGroupName: (empty(azureReuseConfig.existingContainerAppsEnvironmentResourceGroupName)
? azureReuseConfigDefaults.existingContainerAppsEnvironmentResourceGroupName
: azureReuseConfig.existingContainerAppsEnvironmentResourceGroupName)
existingContainerAppsEnvironmentName: (empty(azureReuseConfig.existingContainerAppsEnvironmentName)
? azureReuseConfigDefaults.existingContainerAppsEnvironmentName
: azureReuseConfig.existingContainerAppsEnvironmentName)
aiHubReuse: (empty(azureReuseConfig.aiHubReuse)
? azureReuseConfigDefaults.aiHubReuse
: toLower(azureReuseConfig.aiHubReuse) == 'true')
existingAiHubResourceGroupName: (empty(azureReuseConfig.existingAiHubResourceGroupName)
? azureReuseConfigDefaults.existingAiHubResourceGroupName
: azureReuseConfig.existingAiHubResourceGroupName)
existingAiHubName: (empty(azureReuseConfig.existingAiHubName)
? azureReuseConfigDefaults.existingAiHubName
: azureReuseConfig.existingAiHubName)
existingAiHubProjectName: (empty(azureReuseConfig.existingAiHubProjectName)
? azureReuseConfigDefaults.existingAiHubProjectName
: azureReuseConfig.existingAiHubProjectName)
})
@description('Name of the Resource Group to deploy the resources. If left empty, a name will be generated using Azure CAF best practices.')
var _resourceGroupName = !empty(resourceGroupName)
? resourceGroupName
: '${abbrs.managementGovernance.resourceGroup}${workloadName}'
@description('Name of the VPN Gateway. If left empty, a name will be generated using Azure CAF best practices.')
var _vpnGatewayName = !empty(vpnGatewayName) ? vpnGatewayName : '${abbrs.security.vpnGateway}${resourceToken}'
@description('Name of the VPN Gateway public IP address. If left empty, a name will be generated using Azure CAF best practices.')
var _vpnGatewayPublicIpName = !empty(vpnGatewayPublicIpName)
? vpnGatewayPublicIpName
: '${abbrs.networking.publicIPAddress}${abbrs.security.vpnGateway}${resourceToken}'
@description('Name of the Bastion host VM. If left empty, a name will be generated using Azure CAF best practices.')
var _vmName = !empty(vmName) ? vmName : '${abbrs.compute.virtualMachine}${resourceToken}'
@description('Username for the Bastion host VM when deploying with networkIsolation true.')
var _vmUserName = !empty(vmUserName) ? vmUserName : 'vmuser'
@description('Name of the Key Vault secret to store the VM user password. Defaults to vmUserInitialPassword.')
var _vmUserPasswordKeyVaultSecretName = !empty(vmUserPasswordKeyVaultSecretName)
? vmUserPasswordKeyVaultSecretName
: 'vmUserInitialPassword'
@description('Name of the Bastion host when deploying with networkIsolation true, using Azure CAF best practices.')
var bastionHostName = '${abbrs.security.bastion}${_vmName}'
@description('Name of the Bastion host public IP address when deploying with networkIsolation true, using Azure CAF best practices.')
var bastionHostPublicIpName = '${abbrs.networking.publicIPAddress}${bastionHostName}'
@description('Name of the Key Vault to store Bastion host VM secrets. If left empty, a name will be generated using Azure CAF best practices.')
var _bastionKeyVaultName = !empty(bastionKeyVaultName)
? bastionKeyVaultName
: '${abbrs.security.keyVault}${abbrs.compute.virtualMachine}${resourceToken}'
@description('Name of the VM NIC when deploying with networkIsolation true, using Azure CAF best practices.')
var vmNicName = '${abbrs.networking.networkInterface}${_vmName}'
@description('Name of the VM OS disk when deploying with networkIsolation true, using Azure CAF best practices.')
var vmOSDiskName = '${abbrs.compute.managedDiskOS}${_vmName}'
@description('Name of the VM managed identity when deploying with networkIsolation true, using Azure CAF best practices.')
var vmManagedIdentityName = '${abbrs.security.managedIdentity}${_vmName}'
@description('Whether to reuse an existing Virtual Network as defined in the azureReuseConfig parameter. Defaults to false.')
var _vnetReuse = _azureReuseConfig.vnetReuse
@description('Name of the Virtual Network to deploy the resources. If left empty, a name will be generated using Azure CAF best practices.')
var _vnetName = _azureReuseConfig.vnetReuse
? _azureReuseConfig.existingVnetName
: !empty(vnetName) ? vnetName : '${abbrs.networking.virtualNetwork}${resourceToken}'
@description('Address space for the Virtual Network. Defaults to 10.0.0.0/23.')
var _vnetAddress = !empty(vnetAddress) ? vnetAddress : '10.0.0.0/23'
@description('Name of the network security group for the AI services. If left empty, a name will be generated using Azure CAF best practices.')
var _aiNsgName = !empty(aiNsgName)
? aiNsgName
: '${abbrs.networking.networkSecurityGroup}${abbrs.ai.aiServices}${resourceToken}'
@description('Name of the subnet for the AI services. If left empty, a name will be generated using Azure CAF best practices.')
var _aiSubnetName = !empty(aiSubnetName)
? aiSubnetName
: '${abbrs.networking.virtualNetworkSubnet}${abbrs.ai.aiServices}${resourceToken}'
@description('Address prefix for the AI services subnet. Defaults to 10.0.0.0/26.')
var _aiSubnetPrefix = !empty(aiSubnetPrefix) ? aiSubnetPrefix : '10.0.0.0/26'
@description('Name of the network security group for the Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
var _acaNsgName = !empty(acaNsgName)
? acaNsgName
: '${abbrs.networking.networkSecurityGroup}${abbrs.containers.containerAppsEnvironment}${resourceToken}'
@description('Name of the subnet for the Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
var _acaSubnetName = !empty(acaSubnetName)
? acaSubnetName
: '${abbrs.networking.virtualNetworkSubnet}${abbrs.containers.containerAppsEnvironment}${resourceToken}'
@description('Address prefix for the Azure Container Apps environment subnet. Defaults to 10.0.1.64/26.')
var _acaSubnetPrefix = !empty(acaSubnetPrefix) ? acaSubnetPrefix : '10.0.1.64/26'
@description('Name of the network security group for the Bastion host VM. If left empty, a name will be generated using Azure CAF best practices.')
var _bastionNsgName = !empty(bastionNsgName)
? bastionNsgName
: '${abbrs.networking.networkSecurityGroup}${abbrs.security.bastion}${resourceToken}'
@description('Address prefix for the Bastion host VM subnet. Defaults to 10.0.0.64/26.')
var _bastionSubnetPrefix = !empty(bastionSubnetPrefix) ? bastionSubnetPrefix : '10.0.0.64/26'
@description('Name of the network security group for the Azure Cosmos DB. If left empty, a name will be generated using Azure CAF best practices.')
var _databaseNsgName = !empty(databaseNsgName)
? databaseNsgName
: '${abbrs.networking.networkSecurityGroup}${abbrs.databases.cosmosDBTable}${resourceToken}'
@description('Name of the subnet for Azure Cosmos DB. If left empty, a name will be generated using Azure CAF best practices.')
var _databaseSubnetName = !empty(databaseSubnetName)
? databaseSubnetName
: '${abbrs.networking.virtualNetworkSubnet}${abbrs.databases.cosmosDBTable}${resourceToken}'
@description('Address prefix for the Azure Cosmos DB subnet. Defaults to 10.0.1.0/26.')
var _databaseSubnetPrefix = !empty(databaseSubnetPrefix) ? databaseSubnetPrefix : '10.0.1.0/26'
@description('Name of the Private Endpoint for Azure Storage Blob Service. If left empty, a name will be generated using Azure CAF best practices.')
var _azureBlobStorageAccountPe = !empty(azureBlobStorageAccountPe)
? azureBlobStorageAccountPe
: '${abbrs.networking.privateEndpoint}${abbrs.storage.storageAccount}${resourceToken}-blob'
@description('Name of the Private Endpoint for Azure Storage Table Service. If left empty, a name will be generated using Azure CAF best practices.')
var _azureTableStorageAccountPe = !empty(azureTableStorageAccountPe)
? azureTableStorageAccountPe
: '${abbrs.networking.privateEndpoint}${abbrs.storage.storageAccount}${resourceToken}-table'
@description('Name of the Private Endpoint for Azure Storage Queue Service. If left empty, a name will be generated using Azure CAF best practices.')
var _azureQueueStorageAccountPe = !empty(azureQueueStorageAccountPe)
? azureQueueStorageAccountPe
: '${abbrs.networking.privateEndpoint}${abbrs.storage.storageAccount}${resourceToken}-queue'
@description('Name of the Private Endpoint for Azure Storage File Service. If left empty, a name will be generated using Azure CAF best practices.')
var _azureFileStorageAccountPe = !empty(azureFileStorageAccountPe)
? azureFileStorageAccountPe
: '${abbrs.networking.privateEndpoint}${abbrs.storage.storageAccount}${resourceToken}-file'
@description('Name of the Private Endpoint for Azure Cosmos DB. If left empty, a name will be generated using Azure CAF best practices.')
var _azureCosmosDbAccountPe = !empty(azureCosmosDbAccountPe)
? azureCosmosDbAccountPe
: '${abbrs.networking.privateEndpoint}${abbrs.databases.cosmosDBDatabase}${resourceToken}'
@description('Name of the Private Endpoint for Azure Key Vault. If left empty, a name will be generated using Azure CAF best practices.')
var _keyVaultPe = !empty(keyVaultPe)
? keyVaultPe
: '${abbrs.networking.privateEndpoint}${abbrs.security.keyVault}${resourceToken}'
@description('Name of the Private Endpoint for Azure App Configuration. If left empty, a name will be generated using Azure CAF best practices.')
var _appConfigPe = !empty(appConfigPe)
? appConfigPe
: '${abbrs.networking.privateEndpoint}${abbrs.developerTools.appConfigurationStore}${resourceToken}'
@description('Name of the Private Link for Azure Monitor. If left empty, a name will be generated using Azure CAF best practices.')
var _azureMonitorPrivateLinkName = !empty(azureMonitorPrivateLinkName)
? azureMonitorPrivateLinkName
: '${abbrs.networking.privateLink}${abbrs.managementGovernance.logAnalyticsWorkspace}${resourceToken}'
@description('Name of the Private Endpoint for Log Analytics Workspace. If left empty, a name will be generated using Azure CAF best practices.')
var _logAnalyticsPe = !empty(logAnalyticsPe)
? logAnalyticsPe
: '${abbrs.networking.privateEndpoint}${abbrs.managementGovernance.logAnalyticsWorkspace}${resourceToken}'
@description('Name of the Private Endpoint for Azure AI Services. If left empty, a name will be generated using Azure CAF best practices.')
var _aiServicesPe = !empty(aiServicesPe)
? aiServicesPe
: '${abbrs.networking.privateEndpoint}${abbrs.ai.aiServices}${resourceToken}'
@description('Name of the Azure Cosmos DB account to store application data. If left empty, a name will be generated using Azure CAF best practices.')
var _azureCosmosDbName = _azureReuseConfig.cosmosDbReuse
? _azureReuseConfig.existingCosmosDbAccountName
: !empty(azureCosmosDbName) ? azureCosmosDbName : '${abbrs.databases.cosmosDBTable}${resourceToken}'
@description('Name of the Azure Cosmos DB database to create in the account. If left empty, a name will be generated using Azure CAF best practices.')
var _azureCosmosDatabaseName = _azureReuseConfig.cosmosDbReuse
? _azureReuseConfig.existingCosmosDbDatabaseName
: !empty(azureCosmosDatabaseName) ? azureCosmosDatabaseName : '${abbrs.databases.cosmosDBDatabase}${resourceToken}'
@description('Name of the Azure AI services instance. If left empty, a name will be generated using Azure CAF best practices.')
var _aiServicesName = _azureReuseConfig.aiServicesReuse
? _azureReuseConfig.existingAiServicesName
: !empty(aiServicesName) ? aiServicesName : '${abbrs.ai.aiServices}${resourceToken}'
@description('API version for the Azure OpenAI Service. Defaults to 2025-03-01-preview.')
var _openaiApiVersion = !empty(openaiApiVersion) ? openaiApiVersion : '2025-03-01-preview'
@description('Name of the Azure Storage account to store application data. If left empty, a name will be generated using Azure CAF best practices.')
var _storageAccountName = _azureReuseConfig.storageReuse
? _azureReuseConfig.existingStorageName
: !empty(storageAccountName) ? storageAccountName : '${abbrs.storage.storageAccount}${resourceToken}'
@description('Name of the Azure Storage blob container to store documents to process. Defaults to documents.')
var _storageContainerName = !empty(storageContainerName) ? storageContainerName : 'documents'
@description('Name of the Azure Key Vault to store application secrets. If left empty, a name will be generated using Azure CAF best practices.')
var _keyVaultName = _azureReuseConfig.keyVaultReuse
? _azureReuseConfig.existingKeyVaultName
: !empty(keyVaultName) ? keyVaultName : '${abbrs.security.keyVault}${resourceToken}'
@description('Name of the App Configuration Store to store application settings. If left empty, a name will be generated using Azure CAF best practices.')
var _appConfigName = _azureReuseConfig.appConfigReuse
? _azureReuseConfig.existingAppConfigName
: !empty(appConfigName) ? appConfigName : '${abbrs.developerTools.appConfigurationStore}${resourceToken}'
@description('Name of the Log Analytics Workspace to store logs and metrics. If left empty, a name will be generated using Azure CAF best practices.')
var _logAnalyticsWorkspaceName = _azureReuseConfig.logAnalyticsWorkspaceReuse
? _azureReuseConfig.existingLogAnalyticsWorkspaceName
: !empty(logAnalyticsWorkspaceName)
? logAnalyticsWorkspaceName
: '${abbrs.managementGovernance.logAnalyticsWorkspace}${resourceToken}'
@description('Name of the Application Insights instance to monitor the application. If left empty, a name will be generated using Azure CAF best practices.')
var _applicationInsightsName = _azureReuseConfig.appInsightsReuse
? _azureReuseConfig.existingAppInsightsName
: !empty(applicationInsightsName)
? applicationInsightsName
: '${abbrs.managementGovernance.applicationInsights}${resourceToken}'
@description('Name of the Private Endpoint for Azure Container Registry. If left empty, a name will be generated using Azure CAF best practices.')
var _containerRegistryPeName = !empty(containerRegistryPe)
? containerRegistryPe
: '${abbrs.networking.privateEndpoint}${abbrs.containers.containerRegistry}${resourceToken}'
@description('Name of the Azure Container Registry to store application images. If left empty, a name will be generated using Azure CAF best practices.')
var _containerRegistryName = _azureReuseConfig.containerRegistryReuse
? _azureReuseConfig.existingContainerRegistryName
: !empty(containerRegistryName) ? containerRegistryName : '${abbrs.containers.containerRegistry}${resourceToken}'
@description('Name of the Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
var _containerAppsEnvironmentName = _azureReuseConfig.containerAppsEnvironmentReuse
? _azureReuseConfig.existingContainerAppsEnvironmentName
: !empty(containerAppsEnvironmentName)
? containerAppsEnvironmentName
: '${abbrs.containers.containerAppsEnvironment}${resourceToken}'
@description('Name of the Private Endpoint for Azure Container Apps environment. If left empty, a name will be generated using Azure CAF best practices.')
var _containerAppsEnvironmentPe = !empty(containerAppsEnvironmentPe)
? containerAppsEnvironmentPe
: '${abbrs.networking.privateEndpoint}${abbrs.containers.containerAppsEnvironment}${resourceToken}'
@description('Name of the Private Endpoint for Azure AI Foundry Hub. If left empty, a name will be generated using Azure CAF best practices.')
var _aiHubPe = !empty(aiHubPe) ? aiHubPe : '${abbrs.networking.privateEndpoint}${abbrs.ai.aiHub}${resourceToken}'
@description('Name of the Azure AI Foundry Hub to manage resources for AI projects. If left empty, a name will be generated using Azure CAF best practices.')
var _aiHubName = _azureReuseConfig.aiHubReuse
? _azureReuseConfig.existingAiHubName
: !empty(aiHubName) ? aiHubName : '${abbrs.ai.aiHub}${resourceToken}'
@description('Name of the Azure AI Foundry Hub project to build, test, and deploy AI capabilities. If left empty, a name will be generated using Azure CAF best practices.')
var _aiHubProjectName = _azureReuseConfig.aiHubReuse
? _azureReuseConfig.existingAiHubProjectName
: !empty(aiHubProjectName) ? aiHubProjectName : '${abbrs.ai.aiHubProject}${resourceToken}'
@description('VM Administrator Login assignments for the defined identities.')
var virtualMachineAdministratorLoginIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: virtualMachineAdministratorLoginRole.id
principalType: identity.principalType
}
]
@description('App Config Data Owner assignments for the defined identities.')
var appConfigDataOwnerIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: appConfigDataOwnerRole.id
principalType: identity.principalType
}
]
@description('All App Config Data Owner assignments for the defined identities and the AI Services managed identity.')
var appConfigDataOwnerAssignments = concat(appConfigDataOwnerIdentityAssignments, [
{
principalId: aiServices.outputs.identityPrincipalId
roleDefinitionId: appConfigDataOwnerRole.id
principalType: 'ServicePrincipal'
}
])
@description('Contributor assignments for the defined identities.')
var contributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: contributorRole.id
principalType: identity.principalType
}
]
@description('Key Vault Secrets User assignments for the defined identities.')
var keyVaultSecretsUserIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: keyVaultSecretsUserRole.id
principalType: identity.principalType
}
]
@description('Cognitive Services User assignments for the defined identities.')
var cognitiveServicesUserRoleAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: cognitiveServicesUserRole.id
principalType: identity.principalType
}
]
@description('Cognitive Services OpenAI User assignments for the defined identities.')
var cognitiveServicesOpenAIUserRoleAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: cognitiveServicesOpenAIUserRole.id
principalType: identity.principalType
}
]
@description('Storage Account Contributor assignments for the defined identities.')
var storageAccountContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: storageAccountContributorRole.id
principalType: identity.principalType
}
]
@description('Storage Blob Data Contributor assignments for the defined identities.')
var storageBlobDataContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: storageBlobDataContributorRole.id
principalType: identity.principalType
}
]
@description('Storage Blob Data Owner assignments for the defined identities.')
var storageBlobDataOwnerIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: storageBlobDataOwnerRole.id
principalType: identity.principalType
}
]
@description('Storage File Data Privileged Contributor assignments for the defined identities.')
var storageFileDataPrivilegedContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: storageFileDataPrivilegedContributorRole.id
principalType: identity.principalType
}
]
@description('Storage Table Data Contributor assignments for the defined identities.')
var storageTableDataContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: storageTableDataContributorRole.id
principalType: identity.principalType
}
]
@description('Storage Queue Data Contributor assignments for the defined identities.')
var storageQueueDataContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: storageQueueDataContributorRole.id
principalType: identity.principalType
}
]
@description('ACR Push assignments for the defined identities.')
var acrPushIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: acrPushRole.id
principalType: identity.principalType
}
]
@description('ACR Pull assignments for the defined identities.')
var acrPullIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: acrPullRole.id
principalType: identity.principalType
}
]
@description('Azure ML Data Scientist assignments for the defined identities.')
var azureMLDataScientistRoleAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: azureMLDataScientistRole.id
principalType: identity.principalType
}
]
@description('Cosmos DB Account Contributor assignments for the defined identities.')
var cosmosDbAccountContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: cosmosDbAccountContributorRole.id
principalType: identity.principalType
}
]
@description('Cosmos DB Data Contributor assignments for the defined identities.')
var cosmosDbDataContributorIdentityAssignments = [
for identity in identities: {
principalId: identity.principalId
roleDefinitionId: '00000000-0000-0000-0000-000000000002' // Cosmos DB Built-in Data Contributor role
principalType: identity.principalType
}
]
@description('Secure application settings to be stored in the Key Vault.')
var secureAppSettings = [
{
name: _vmUserPasswordKeyVaultSecretName
value: vmUserInitialPassword!
}
]
@description('Application settings to be stored in the App Configuration Store.')
var appSettings = [
{
name: 'AZURE_AISERVICES_ENDPOINT'
value: aiServices.outputs.endpoint
}
{
name: 'AZURE_OPENAI_ENDPOINT'
value: aiServices.outputs.openAIEndpoint
}
{
name: 'AZURE_OPENAI_CHAT_DEPLOYMENT'
value: chatModelDeployment.name
}
{
name: 'AZURE_STORAGE_ACCOUNT'
value: _storageAccountName
}
{
name: 'NETWORK_ISOLATION'
value: string(networkIsolation)
}
{
name: 'AZURE_OPENAI_API_VERSION'
value: _openaiApiVersion
}
{
name: 'AZURE_SUBSCRIPTION_ID'
value: subscription().subscriptionId
}
{
name: 'AZURE_RESOURCE_GROUP_NAME'
value: resourceGroup.name
}
{
name: 'LOGLEVEL'
value: 'INFO'
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: applicationInsights.outputs.connectionString
}
{
name: 'WEBSITE_HTTPLOGGING_RETENTION_DAYS'
value: '7'
}
]
// Deployments
resource resourceGroup 'Microsoft.Resources/resourceGroups@2024-03-01' = {
name: _resourceGroupName
location: location
tags: union(tags, {})
}
resource contributorRole 'Microsoft.Authorization/roleDefinitions@2022-05-01-preview' existing = {
scope: resourceGroup
name: roles.general.contributor
}
module resourceGroupRoleAssignment './security/resource-group-role-assignment.bicep' = {
name: '${_resourceGroupName}-role'
scope: resourceGroup
params: {
roleAssignments: concat(contributorIdentityAssignments, [])
}
}
module aiNsg './networking/network-security-group.bicep' = if (networkIsolation && !_vnetReuse) {
name: _aiNsgName
scope: resourceGroup
params: {
name: _aiNsgName
location: location
tags: union(tags, {})
securityRules: []
}
}
module acaNsg './networking/network-security-group.bicep' = if (networkIsolation && !_vnetReuse) {
name: _acaNsgName
scope: resourceGroup
params: {
name: _acaNsgName
location: location
tags: union(tags, {})
securityRules: []
}
}
module bastionNsg './networking/network-security-group.bicep' = if (networkIsolation && !_vnetReuse) {
name: _bastionNsgName
scope: resourceGroup
params: {
name: _bastionNsgName
location: location
tags: union(tags, {})
securityRules: [
{
name: 'AllowHttpsInbound'
properties: {
priority: 100
protocol: 'Tcp'
access: 'Allow'
direction: 'Inbound'
sourceAddressPrefix: 'Internet'
sourcePortRange: '*'
destinationAddressPrefix: '*'
destinationPortRange: '443'
}
}
{
name: 'AllowGatewayManagerInbound'
properties: {
priority: 120
protocol: 'Tcp'
access: 'Allow'
direction: 'Inbound'
sourceAddressPrefix: 'GatewayManager'
sourcePortRange: '*'
destinationAddressPrefix: '*'
destinationPortRange: '443'
}
}
{
name: 'AllowLoadBalancerInbound'
properties: {
priority: 110
protocol: 'Tcp'
access: 'Allow'
direction: 'Inbound'
sourceAddressPrefix: 'AzureLoadBalancer'
sourcePortRange: '*'
destinationAddressPrefix: '*'
destinationPortRange: '443'
}
}
{
name: 'AllowBastionHostCommunicationInBound'
properties: {
protocol: '*'
sourcePortRange: '*'
sourceAddressPrefix: 'VirtualNetwork'
destinationPortRanges: [
'8080'
'5701'
]
destinationAddressPrefix: 'VirtualNetwork'
access: 'Allow'
priority: 130
direction: 'Inbound'
}
}
{
name: 'AllowSshRdpOutBound'
properties: {
protocol: 'Tcp'
sourcePortRange: '*'
sourceAddressPrefix: '*'
destinationPortRanges: [
'22'
'3389'
]
destinationAddressPrefix: 'VirtualNetwork'
access: 'Allow'
priority: 100
direction: 'Outbound'
}
}
{
name: 'AllowAzureCloudCommunicationOutBound'
properties: {
protocol: 'Tcp'
sourcePortRange: '*'
sourceAddressPrefix: '*'
destinationPortRange: '443'
destinationAddressPrefix: 'AzureCloud'
access: 'Allow'
priority: 110
direction: 'Outbound'
}
}
{
name: 'AllowBastionHostCommunicationOutBound'
properties: {
protocol: '*'