@@ -54,12 +54,12 @@ param embeddingModel string = 'text-embedding-ada-002'
5454param embeddingDeploymentCapacity int = 80
5555
5656param imageTag string = 'latest'
57+ param AZURE_LOCATION string =''
58+ var solutionLocation = empty (AZURE_LOCATION ) ? resourceGroup ().location : AZURE_LOCATION
5759
58- var uniqueId = toLower (uniqueString (environmentName , subscription ().id , resourceGroup (). location ))
60+ var uniqueId = toLower (uniqueString (environmentName , subscription ().id , solutionLocation ))
5961var solutionPrefix = 'dg${padLeft (take (uniqueId , 12 ), 12 , '0' )}'
60- var resourceGroupLocation = resourceGroup ().location
6162
62- var solutionLocation = resourceGroupLocation
6363var baseUrl = 'https://raw.githubusercontent.com/microsoft/document-generation-solution-accelerator/main/'
6464
6565var ApplicationInsightsName = 'appi-${solutionPrefix }'
@@ -80,7 +80,7 @@ module kvault 'deploy_keyvault.bicep' = {
8080 name : 'deploy_keyvault'
8181 params : {
8282 solutionName : solutionPrefix
83- solutionLocation : resourceGroupLocation
83+ solutionLocation : solutionLocation
8484 managedIdentityObjectId :managedIdentityModule .outputs .managedIdentityOutput .objectId
8585 }
8686 scope : resourceGroup (resourceGroup ().name )
@@ -91,7 +91,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
9191 name : 'deploy_ai_foundry'
9292 params : {
9393 solutionName : solutionPrefix
94- solutionLocation : resourceGroupLocation
94+ solutionLocation : solutionLocation
9595 keyVaultName : kvault .outputs .keyvaultName
9696 deploymentType : deploymentType
9797 gptModelName : gptModelName
@@ -369,7 +369,7 @@ module appserviceModule 'deploy_app_service.bicep' = {
369369 applicationInsightsId : aifoundry .outputs .applicationInsightsId
370370 // identity:managedIdentityModule.outputs.managedIdentityOutput.id
371371 solutionName : solutionPrefix
372- // solutionLocation: solutionLocation
372+ solutionLocation : solutionLocation
373373 aiSearchService : aifoundry .outputs .aiSearchService
374374 AzureSearchKey : keyVault .getSecret ('AZURE-SEARCH-KEY' )
375375 AzureOpenAIEndpoint :aifoundry .outputs .aiServicesTarget
@@ -392,7 +392,7 @@ output WEB_APP_URL string = appserviceModule.outputs.webAppUrl
392392
393393resource Workspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' = {
394394 name : WorkspaceName
395- location : resourceGroup (). location
395+ location : solutionLocation
396396 properties : {
397397 sku : {
398398 name : 'PerGB2018'
@@ -403,7 +403,7 @@ resource Workspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' = {
403403
404404resource ApplicationInsights 'Microsoft.Insights/components@2020-02-02' = {
405405 name : ApplicationInsightsName
406- location : resourceGroup (). location
406+ location : solutionLocation
407407 tags : {
408408 'hidden-link:${resourceId ('Microsoft.Web/sites' ,ApplicationInsightsName )}' : 'Resource'
409409 }
0 commit comments