@@ -63,18 +63,6 @@ var hostingPlanName string = 'asp-${solutionSuffix}'
6363])
6464param hostingPlanSku string = 'B3'
6565
66- @description ('The sku tier for the App Service plan' )
67- @allowed ([
68- 'Free'
69- 'Shared'
70- 'Basic'
71- 'Standard'
72- 'Premium'
73- 'PremiumV2'
74- 'PremiumV3'
75- ])
76- param skuTier string = 'Basic'
77-
7866@description ('The type of database to deploy (cosmos or postgres)' )
7967@allowed ([
8068 'PostgreSQL'
@@ -361,7 +349,7 @@ param enableRedundancy bool = false
361349param enablePrivateNetworking bool = false
362350
363351@description ('Optional. Size of the Jumpbox Virtual Machine when created. Set to custom value if enablePrivateNetworking is true.' )
364- param vmSize string ?
352+ param vmSize string = 'Standard_DS2_v2'
365353
366354@secure ()
367355@description ('Optional. The user name for the administrator account of the virtual machine. Allows to customize credentials if `enablePrivateNetworking` is set to true.' )
@@ -521,11 +509,9 @@ var privateDnsZones = [
521509 'privatelink.openai.azure.com'
522510 'privatelink.blob.${environment ().suffixes .storage }'
523511 'privatelink.queue.${environment ().suffixes .storage }'
524- 'privatelink.file.${environment ().suffixes .storage }'
525512 'privatelink.documents.azure.com'
526513 'privatelink.postgres.cosmos.azure.com'
527514 'privatelink.vaultcore.azure.net'
528- 'privatelink.azurecr.io'
529515 'privatelink.azurewebsites.net'
530516 'privatelink.search.windows.net'
531517 'privatelink.api.azureml.ms'
@@ -537,14 +523,13 @@ var dnsZoneIndex = {
537523 openAI : 1
538524 storageBlob : 2
539525 storageQueue : 3
540- storageFile : 4
541- cosmosDB : 5 // 'privatelink.mongo.cosmos.azure.com'
542- postgresDB : 6 // 'privatelink.postgres.cosmos.azure.com'
543- keyVault : 7
544- containerRegistry : 8
545- appService : 9
546- searchService : 10
547- machinelearning : 11
526+ cosmosDB : 4 // 'privatelink.mongo.cosmos.azure.com'
527+ postgresDB : 5 // 'privatelink.postgres.cosmos.azure.com'
528+ keyVault : 6
529+ appService : 7
530+ searchService : 8
531+ machinelearning : 9
532+ // The indexes for 'storageFile' and 'containerRegistry' have been removed as they were unused
548533}
549534
550535// ===================================================
@@ -705,7 +690,7 @@ module openai 'modules/core/ai/cognitiveservices.bicep' = {
705690 location : location
706691 tags : allTags
707692 kind : 'OpenAI'
708- sku : 'S0'
693+ sku : azureOpenAISkuName
709694 deployments : openAiDeployments
710695 userAssignedResourceId : managedIdentityModule .outputs .managedIdentityOutput .id
711696 enablePrivateNetworking : enablePrivateNetworking
@@ -749,7 +734,7 @@ module computerVision 'modules/core/ai/cognitiveservices.bicep' = if (useAdvance
749734 kind : 'ComputerVision'
750735 location : computerVisionLocation != '' ? computerVisionLocation : location
751736 tags : allTags
752- sku : 'S0'
737+ sku : computerVisionSkuName
753738
754739 enablePrivateNetworking : enablePrivateNetworking
755740 subnetResourceId : enablePrivateNetworking ? network !.outputs .subnetPrivateEndpointsResourceId : null
@@ -919,7 +904,7 @@ module web 'modules/app/web.bicep' = if (hostingModel == 'code') {
919904 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
920905 vnetImagePullEnabled : enablePrivateNetworking ? true : false
921906 virtualNetworkSubnetId : enablePrivateNetworking ? network !.outputs .subnetWebResourceId : ''
922- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
907+ publicNetworkAccess : 'Enabled' // Always enabling public network access
923908 privateEndpoints : enablePrivateNetworking
924909 ? [
925910 {
@@ -972,6 +957,7 @@ module web 'modules/app/web.bicep' = if (hostingModel == 'code') {
972957 OPEN_AI_FUNCTIONS_SYSTEM_PROMPT : openAIFunctionsSystemPrompt
973958 SEMANTIC_KERNEL_SYSTEM_PROMPT : semanticKernelSystemPrompt
974959 MANAGED_IDENTITY_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId
960+ MANAGED_IDENTITY_RESOURCE_ID : managedIdentityModule .outputs .managedIdentityOutput .id
975961 AZURE_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId // Required so LangChain AzureSearch vector store authenticates with this user-assigned managed identity
976962 APP_ENV : appEnvironment
977963 },
@@ -1008,7 +994,7 @@ module web 'modules/app/web.bicep' = if (hostingModel == 'code') {
1008994 ? {
1009995 AZURE_POSTGRESQL_HOST_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLServerName
1010996 AZURE_POSTGRESQL_DATABASE_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLDatabaseName
1011- AZURE_POSTGRESQL_USER : websiteName
997+ AZURE_POSTGRESQL_USER : managedIdentityModule . outputs . managedIdentityOutput . name
1012998 }
1013999 : {}
10141000 )
@@ -1022,6 +1008,7 @@ module web_docker 'modules/app/web.bicep' = if (hostingModel == 'container') {
10221008 name : '${websiteName }-docker'
10231009 location : location
10241010 tags : union (tags , { 'azd-service-name' : 'web-docker' })
1011+ allTags : allTags
10251012 kind : 'app,linux,container'
10261013 serverFarmResourceId : webServerFarm .outputs .resourceId
10271014 dockerFullImageName : '${registryName }.azurecr.io/rag-webapp:${appversion }'
@@ -1033,7 +1020,7 @@ module web_docker 'modules/app/web.bicep' = if (hostingModel == 'container') {
10331020 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
10341021 vnetImagePullEnabled : enablePrivateNetworking ? true : false
10351022 virtualNetworkSubnetId : enablePrivateNetworking ? network !.outputs .subnetWebResourceId : ''
1036- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
1023+ publicNetworkAccess : 'Enabled' // Always enabling public network access
10371024 privateEndpoints : enablePrivateNetworking
10381025 ? [
10391026 {
@@ -1087,6 +1074,7 @@ module web_docker 'modules/app/web.bicep' = if (hostingModel == 'container') {
10871074 OPEN_AI_FUNCTIONS_SYSTEM_PROMPT : openAIFunctionsSystemPrompt
10881075 SEMANTIC_KERNEL_SYSTEM_PROMPT : semanticKernelSystemPrompt
10891076 MANAGED_IDENTITY_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId
1077+ MANAGED_IDENTITY_RESOURCE_ID : managedIdentityModule .outputs .managedIdentityOutput .id
10901078 AZURE_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId // Required so LangChain AzureSearch vector store authenticates with this user-assigned managed identity
10911079 APP_ENV : appEnvironment
10921080 },
@@ -1123,7 +1111,7 @@ module web_docker 'modules/app/web.bicep' = if (hostingModel == 'container') {
11231111 ? {
11241112 AZURE_POSTGRESQL_HOST_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLServerName
11251113 AZURE_POSTGRESQL_DATABASE_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLDatabaseName
1126- AZURE_POSTGRESQL_USER : '${ websiteName }-docker'
1114+ AZURE_POSTGRESQL_USER : managedIdentityModule . outputs . managedIdentityOutput . name
11271115 }
11281116 : {}
11291117 )
@@ -1137,6 +1125,7 @@ module adminweb 'modules/app/adminweb.bicep' = if (hostingModel == 'code') {
11371125 name : adminWebsiteName
11381126 location : location
11391127 tags : union (tags , { 'azd-service-name' : 'adminweb' })
1128+ allTags : allTags
11401129 kind : 'app,linux'
11411130 serverFarmResourceId : webServerFarm .outputs .resourceId
11421131 // Python runtime settings
@@ -1179,6 +1168,7 @@ module adminweb 'modules/app/adminweb.bicep' = if (hostingModel == 'code') {
11791168 DATABASE_TYPE : databaseType
11801169 USE_KEY_VAULT : 'true'
11811170 MANAGED_IDENTITY_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId
1171+ MANAGED_IDENTITY_RESOURCE_ID : managedIdentityModule .outputs .managedIdentityOutput .id
11821172 APP_ENV : appEnvironment
11831173 },
11841174 databaseType == 'CosmosDB'
@@ -1211,7 +1201,7 @@ module adminweb 'modules/app/adminweb.bicep' = if (hostingModel == 'code') {
12111201 ? {
12121202 AZURE_POSTGRESQL_HOST_NAME : postgresDBModule .?outputs .postgresDbOutput .postgreSQLServerName
12131203 AZURE_POSTGRESQL_DATABASE_NAME : postgresDBModule .?outputs .postgresDbOutput .postgreSQLDatabaseName
1214- AZURE_POSTGRESQL_USER : adminWebsiteName
1204+ AZURE_POSTGRESQL_USER : managedIdentityModule . outputs . managedIdentityOutput . name
12151205 }
12161206 : {}
12171207 )
@@ -1221,7 +1211,7 @@ module adminweb 'modules/app/adminweb.bicep' = if (hostingModel == 'code') {
12211211 vnetImagePullEnabled : enablePrivateNetworking ? true : false
12221212 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
12231213 virtualNetworkSubnetId : enablePrivateNetworking ? network !.outputs .subnetWebResourceId : ''
1224- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
1214+ publicNetworkAccess : 'Enabled' // Always enabling public network access
12251215 privateEndpoints : enablePrivateNetworking
12261216 ? [
12271217 {
@@ -1247,6 +1237,7 @@ module adminweb_docker 'modules/app/adminweb.bicep' = if (hostingModel == 'conta
12471237 name : '${adminWebsiteName }-docker'
12481238 location : location
12491239 tags : union (tags , { 'azd-service-name' : 'adminweb-docker' })
1240+ allTags : allTags
12501241 kind : 'app,linux,container'
12511242 serverFarmResourceId : webServerFarm .outputs .resourceId
12521243 // Docker settings
@@ -1289,6 +1280,7 @@ module adminweb_docker 'modules/app/adminweb.bicep' = if (hostingModel == 'conta
12891280 DATABASE_TYPE : databaseType
12901281 USE_KEY_VAULT : 'true'
12911282 MANAGED_IDENTITY_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId
1283+ MANAGED_IDENTITY_RESOURCE_ID : managedIdentityModule .outputs .managedIdentityOutput .id
12921284 APP_ENV : appEnvironment
12931285 },
12941286 databaseType == 'CosmosDB'
@@ -1321,7 +1313,7 @@ module adminweb_docker 'modules/app/adminweb.bicep' = if (hostingModel == 'conta
13211313 ? {
13221314 AZURE_POSTGRESQL_HOST_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLServerName
13231315 AZURE_POSTGRESQL_DATABASE_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLDatabaseName
1324- AZURE_POSTGRESQL_USER : '${ adminWebsiteName }-docker'
1316+ AZURE_POSTGRESQL_USER : managedIdentityModule . outputs . managedIdentityOutput . name
13251317 }
13261318 : {}
13271319 )
@@ -1331,7 +1323,7 @@ module adminweb_docker 'modules/app/adminweb.bicep' = if (hostingModel == 'conta
13311323 vnetImagePullEnabled : enablePrivateNetworking ? true : false
13321324 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
13331325 virtualNetworkSubnetId : enablePrivateNetworking ? network !.outputs .subnetWebResourceId : ''
1334- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
1326+ publicNetworkAccess : 'Enabled' // Always enabling public network access
13351327 privateEndpoints : enablePrivateNetworking
13361328 ? [
13371329 {
@@ -1371,7 +1363,7 @@ module function 'modules/app/function.bicep' = if (hostingModel == 'code') {
13711363 virtualNetworkSubnetId : enablePrivateNetworking ? network !.outputs .subnetWebResourceId : ''
13721364 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
13731365 vnetImagePullEnabled : enablePrivateNetworking ? true : false
1374- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
1366+ publicNetworkAccess : 'Enabled' // Always enabling public network access
13751367 privateEndpoints : enablePrivateNetworking
13761368 ? [
13771369 {
@@ -1413,6 +1405,7 @@ module function 'modules/app/function.bicep' = if (hostingModel == 'code') {
14131405 AZURE_OPENAI_SYSTEM_MESSAGE : azureOpenAISystemMessage
14141406 DATABASE_TYPE : databaseType
14151407 MANAGED_IDENTITY_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId
1408+ MANAGED_IDENTITY_RESOURCE_ID : managedIdentityModule .outputs .managedIdentityOutput .id
14161409 APP_ENV : appEnvironment
14171410 },
14181411 // Conditionally add database-specific settings
@@ -1439,7 +1432,7 @@ module function 'modules/app/function.bicep' = if (hostingModel == 'code') {
14391432 ? {
14401433 AZURE_POSTGRESQL_HOST_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLServerName
14411434 AZURE_POSTGRESQL_DATABASE_NAME : postgresDBModule .outputs .postgresDbOutput .postgreSQLDatabaseName
1442- AZURE_POSTGRESQL_USER : functionName
1435+ AZURE_POSTGRESQL_USER : managedIdentityModule . outputs . managedIdentityOutput . name
14431436 }
14441437 : {}
14451438 )
@@ -1466,7 +1459,7 @@ module function_docker 'modules/app/function.bicep' = if (hostingModel == 'conta
14661459 virtualNetworkSubnetId : enablePrivateNetworking ? network !.outputs .subnetWebResourceId : ''
14671460 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
14681461 vnetImagePullEnabled : enablePrivateNetworking ? true : false
1469- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
1462+ publicNetworkAccess : 'Enabled' // Always enabling public network access
14701463 privateEndpoints : enablePrivateNetworking
14711464 ? [
14721465 {
@@ -1508,6 +1501,7 @@ module function_docker 'modules/app/function.bicep' = if (hostingModel == 'conta
15081501 AZURE_OPENAI_SYSTEM_MESSAGE : azureOpenAISystemMessage
15091502 DATABASE_TYPE : databaseType
15101503 MANAGED_IDENTITY_CLIENT_ID : managedIdentityModule .outputs .managedIdentityOutput .clientId
1504+ MANAGED_IDENTITY_RESOURCE_ID : managedIdentityModule .outputs .managedIdentityOutput .id
15111505 APP_ENV : appEnvironment
15121506 },
15131507 // Conditionally add database-specific settings
@@ -1534,7 +1528,7 @@ module function_docker 'modules/app/function.bicep' = if (hostingModel == 'conta
15341528 ? {
15351529 AZURE_POSTGRESQL_HOST_NAME : postgresDBModule .?outputs .postgresDbOutput .postgreSQLServerName
15361530 AZURE_POSTGRESQL_DATABASE_NAME : postgresDBModule .?outputs .postgresDbOutput .postgreSQLDatabaseName
1537- AZURE_POSTGRESQL_USER : '${ functionName }-docker'
1531+ AZURE_POSTGRESQL_USER : managedIdentityModule . outputs . managedIdentityOutput . name
15381532 }
15391533 : {}
15401534 )
0 commit comments