@@ -65,7 +65,7 @@ param resourceGroupLocation string = resourceGroup().location
65
65
param resourceNameFormatString string = '{0}avm-cps'
66
66
67
67
@description ('Optional. Enable WAF for the deployment.' )
68
- param enablePrivateNetworking bool = false
68
+ param enablePrivateNetworking bool = true
69
69
70
70
@description ('Optional. Enable/Disable usage telemetry for module.' )
71
71
param enableTelemetry bool = true
@@ -81,6 +81,9 @@ param useLocalBuild bool = false
81
81
@description ('Optional. Enable scaling for the container apps. Defaults to false.' )
82
82
param enableScaling bool = false
83
83
84
+ @description ('Optional: Existing Log Analytics Workspace Resource ID' )
85
+ param existingLogAnalyticsWorkspaceId string = ''
86
+
84
87
// ========== Solution Prefix Variable ========== //
85
88
// @description('Optional. A unique deployment timestamp for solution prefix generation.')
86
89
// param deploymentTimestamp string = utcNow()
@@ -560,16 +563,14 @@ module avmPrivateDnsZones 'br/public:avm/res/network/private-dns-zone:0.7.1' = [
560
563
// }
561
564
// }
562
565
563
- module logAnalyticsWorkspace 'br/public:avm/res/operational-insights/ workspace:0.11.2 ' = {
566
+ module logAnalyticsWorkspace 'modules/log-analytics- workspace.bicep ' = {
564
567
name : 'deploy_log_analytics_workspace'
565
568
params : {
566
569
name : 'log-${solutionPrefix }'
567
570
location : location
568
- skuName : 'PerGB2018'
569
- dataRetention : 30
570
- diagnosticSettings : [{ useThisWorkspace : true }]
571
571
tags : tags
572
572
enableTelemetry : enableTelemetry
573
+ existingLogAnalyticsWorkspaceId : existingLogAnalyticsWorkspaceId
573
574
}
574
575
}
575
576
@@ -1041,6 +1042,7 @@ module avmAiServices 'br/public:avm/res/cognitive-services/account:0.11.0' = {
1041
1042
name : 'aisa-${solutionPrefix }'
1042
1043
location : aiDeploymentsLocation
1043
1044
sku : 'S0'
1045
+ allowProjectManagement : true
1044
1046
managedIdentities : { systemAssigned : true }
1045
1047
kind : 'AIServices'
1046
1048
tags : {
@@ -1126,6 +1128,15 @@ module avmAiServices 'br/public:avm/res/cognitive-services/account:0.11.0' = {
1126
1128
}
1127
1129
}
1128
1130
1131
+ module project 'modules/ai-foundry-project.bicep' = {
1132
+ name : format (resourceNameFormatString , 'aifp-' )
1133
+ params : {
1134
+ name : 'aifp--${solutionPrefix }'
1135
+ location : resourceGroup ().location
1136
+ aiServicesName : avmAiServices .outputs .name
1137
+ }
1138
+ }
1139
+
1129
1140
// Role Assignment
1130
1141
// module avmAiServices_roleAssignment 'br/public:avm/ptn/authorization/resource-role-assignment:0.1.2' = {
1131
1142
// name: format(resourceNameFormatString, 'rbac-ai-services')
@@ -1202,172 +1213,6 @@ module avmAiServices_cu 'br/public:avm/res/cognitive-services/account:0.11.0' =
1202
1213
}
1203
1214
}
1204
1215
1205
- module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20.0' = {
1206
- name : format (resourceNameFormatString , 'aistoragehub-' )
1207
- params : {
1208
- name : 'aisthub${replace (solutionPrefix , '-' , '' )}'
1209
- location : resourceGroupLocation
1210
- //skuName: 'Standard_LRS'
1211
- //kind: 'StorageV2'
1212
- managedIdentities : { systemAssigned : true }
1213
- minimumTlsVersion : 'TLS1_2'
1214
- networkAcls : {
1215
- bypass : 'AzureServices'
1216
- defaultAction : 'Deny'
1217
- }
1218
- tags : tags
1219
- supportsHttpsTrafficOnly : true
1220
- accessTier : 'Hot'
1221
- allowBlobPublicAccess : false
1222
- allowCrossTenantReplication : false
1223
- allowSharedKeyAccess : false
1224
- diagnosticSettings : [
1225
- {
1226
- workspaceResourceId : logAnalyticsWorkspace .outputs .resourceId
1227
- }
1228
- ]
1229
- enableTelemetry : enableTelemetry
1230
- roleAssignments : [
1231
- {
1232
- principalId : avmManagedIdentity .outputs .principalId
1233
- roleDefinitionIdOrName : 'Storage Blob Data Contributor'
1234
- }
1235
- ]
1236
-
1237
- publicNetworkAccess : 'Disabled' // Always enabled for AI Storage Hub
1238
- // WAF related parameters
1239
- //publicNetworkAccess: (deployment_param.enable_waf) ? 'Disabled' : 'Enabled'
1240
- privateEndpoints : (enablePrivateNetworking )
1241
- ? [
1242
- {
1243
- name : 'aistoragehub-private-endpoint-blob-${solutionPrefix }'
1244
- privateEndpointResourceId : avmVirtualNetwork .outputs .resourceId
1245
- service : 'blob'
1246
- privateDnsZoneGroup : {
1247
- privateDnsZoneGroupConfigs : [
1248
- {
1249
- name : 'aistoragehub-dns-zone-blob'
1250
- privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .storageBlob ].outputs .resourceId
1251
- //privateDnsZoneResourceId: avmPrivateDnsZoneStorages[0].outputs.resourceId
1252
- }
1253
- ]
1254
- }
1255
- subnetResourceId : avmVirtualNetwork .outputs .subnetResourceIds [0 ] // Use the backend subnet
1256
- }
1257
- {
1258
- name : 'aistoragehub-private-endpoint-file-${solutionPrefix }'
1259
- privateEndpointResourceId : avmVirtualNetwork .outputs .resourceId
1260
- service : 'file'
1261
- privateDnsZoneGroup : {
1262
- privateDnsZoneGroupConfigs : [
1263
- {
1264
- name : 'aistoragehub-dns-zone-file'
1265
- privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .storageFile ].outputs .resourceId
1266
- //privateDnsZoneResourceId: avmPrivateDnsZoneStorages[1].outputs.resourceId
1267
- }
1268
- ]
1269
- }
1270
- subnetResourceId : avmVirtualNetwork .outputs .subnetResourceIds [0 ] // Use the backend subnet
1271
- }
1272
- ]
1273
- : []
1274
- }
1275
- }
1276
-
1277
- var aiHubStorageResourceId = '/subscriptions/${subscription ().subscriptionId }/resourceGroups/${resourceGroup ().name }/providers/Microsoft.Storage/storageAccounts/${avmAiServices_storage_hub .outputs .name }'
1278
-
1279
- module avmAiHub 'br/public:avm/res/machine-learning-services/workspace:0.12.1' = {
1280
- name : format (resourceNameFormatString , 'aih-' )
1281
- params : {
1282
- name : 'aih-${solutionPrefix }'
1283
- friendlyName : 'aih-${solutionPrefix }'
1284
- description : 'AI Hub for CPS template'
1285
- location : resourceGroupLocation
1286
- sku : 'Basic'
1287
- managedIdentities : {
1288
- userAssignedResourceIds : [
1289
- avmManagedIdentity .outputs .resourceId
1290
- ]
1291
- }
1292
- tags : {
1293
- app : solutionPrefix
1294
- location : resourceGroupLocation
1295
- }
1296
- // dependent resources
1297
- associatedKeyVaultResourceId : avmKeyVault .outputs .resourceId
1298
- primaryUserAssignedIdentity : avmManagedIdentity .outputs .resourceId
1299
- associatedStorageAccountResourceId : aiHubStorageResourceId //avmAiServices_storage_hub.outputs.resourceId
1300
- associatedContainerRegistryResourceId : avmContainerRegistry .outputs .resourceId
1301
- associatedApplicationInsightsResourceId : applicationInsights .outputs .resourceId
1302
- enableTelemetry : enableTelemetry
1303
- kind : 'Hub'
1304
- connections : [
1305
- {
1306
- name : 'AzureOpenAI-Connection'
1307
- category : 'AIServices'
1308
- target : avmAiServices .outputs .endpoint
1309
- connectionProperties : {
1310
- authType : 'AAD'
1311
- }
1312
- isSharedToAll : true
1313
-
1314
- metadata : {
1315
- description : 'Connection to Azure OpenAI'
1316
- ApiType : 'Azure'
1317
- resourceId : avmAiServices .outputs .resourceId
1318
- }
1319
- }
1320
- ]
1321
-
1322
- publicNetworkAccess : (enablePrivateNetworking ) ? 'Disabled' : 'Enabled' // Always enabled for AI Hub
1323
- //<======================= WAF related parameters
1324
- // publicNetworkAccess: (deployment_param.enable_waf) ? 'Disabled' : 'Enabled'
1325
- privateEndpoints : (enablePrivateNetworking )
1326
- ? [
1327
- {
1328
- name : 'ai-hub-private-endpoint-${solutionPrefix }'
1329
- privateEndpointResourceId : avmVirtualNetwork .outputs .resourceId
1330
- privateDnsZoneGroup : {
1331
- privateDnsZoneGroupConfigs : [
1332
- {
1333
- name : 'ai-hub-dns-zone-amlworkspace'
1334
- privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .aiFoundry ].outputs .resourceId
1335
- //privateDnsZoneResourceId: avmPrivateDnsZoneAiFoundryWorkspace[0].outputs.resourceId
1336
- }
1337
- {
1338
- name : 'ai-hub-dns-zone-notebooks'
1339
- privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .notebooks ].outputs .resourceId
1340
- //privateDnsZoneResourceId: avmPrivateDnsZoneAiFoundryWorkspace[1].outputs.resourceId
1341
- }
1342
- ]
1343
- }
1344
- subnetResourceId : avmVirtualNetwork .outputs .subnetResourceIds [0 ] // Use the backend subnet
1345
- }
1346
- ]
1347
- : []
1348
- }
1349
- }
1350
-
1351
- module avmAiProject 'br/public:avm/res/machine-learning-services/workspace:0.12.1' = {
1352
- name : format (resourceNameFormatString , 'aihp-' )
1353
- params : {
1354
- name : 'aihp-${solutionPrefix }'
1355
- location : resourceGroupLocation
1356
- managedIdentities : {
1357
- userAssignedResourceIds : [
1358
- avmManagedIdentity .outputs .resourceId
1359
- ]
1360
- }
1361
- kind : 'Project'
1362
- sku : 'Basic'
1363
- friendlyName : 'aihp-${solutionPrefix }'
1364
- primaryUserAssignedIdentity : avmManagedIdentity .outputs .resourceId
1365
- hubResourceId : avmAiHub .outputs .resourceId
1366
- enableTelemetry : enableTelemetry
1367
- tags : tags
1368
- }
1369
- }
1370
-
1371
1216
// ========== Container App Environment ========== //
1372
1217
module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.2' = {
1373
1218
name : format (resourceNameFormatString , 'cae-' )
@@ -1875,8 +1720,8 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
1875
1720
value : avmStorageAccount .outputs .serviceEndpoints .queue
1876
1721
}
1877
1722
{
1878
- name : 'APP_AI_PROJECT_CONN_STR '
1879
- value : '${ resourceGroupLocation }.api.azureml.ms;${ subscription (). subscriptionId };${ resourceGroup (). name };${ avmAiProject . name }'
1723
+ name : 'APP_AI_PROJECT_ENDPOINT '
1724
+ value : project . outputs . projectEndpoint
1880
1725
}
1881
1726
{
1882
1727
name : 'APP_COSMOS_CONNSTR'
@@ -1912,7 +1757,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
1912
1757
avmAiServices_cu
1913
1758
avmStorageAccount
1914
1759
avmCosmosDB
1915
- avmAiProject
1760
+ project
1916
1761
]
1917
1762
}
1918
1763
0 commit comments