@@ -4,28 +4,19 @@ param Prefix string
44var abbrs = loadJsonContent ('./abbreviations.json' )
55var safePrefix = length (Prefix ) > 20 ? substring (Prefix , 0 , 20 ) : Prefix
66
7+ @description ('Required. Location for all Resources except AI Foundry.' )
8+ param solutionLocation string = resourceGroup ().location
9+
710@allowed ([
811 'australiaeast'
9- 'brazilsouth'
10- 'canadacentral'
11- 'canadaeast'
1212 'eastus'
1313 'eastus2'
1414 'francecentral'
15- 'germanywestcentral'
1615 'japaneast'
17- 'koreacentral'
18- 'northcentralus'
1916 'norwayeast'
20- 'polandcentral'
21- 'southafricanorth'
22- 'southcentralus'
2317 'southindia'
2418 'swedencentral'
25- 'switzerlandnorth'
26- 'uaenorth'
2719 'uksouth'
28- 'westeurope'
2920 'westus'
3021 'westus3'
3122])
@@ -57,8 +48,6 @@ param gptModelVersion string = '2024-08-06'
5748var uniqueId = toLower (uniqueString (subscription ().id , safePrefix , resourceGroup ().location ))
5849var UniquePrefix = 'cm${padLeft (take (uniqueId , 12 ), 12 , '0' )}'
5950var ResourcePrefix = take ('cm${safePrefix }${UniquePrefix }' , 15 )
60- var location = resourceGroup ().location
61- var dblocation = resourceGroup ().location
6251var cosmosdbDatabase = 'cmsadb'
6352var cosmosdbBatchContainer = 'cmsabatch'
6453var cosmosdbFileContainer = 'cmsafile'
@@ -85,7 +74,7 @@ var aiModelDeployments = [
8574
8675resource azureAiServices 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' = {
8776 name : azureAiServicesName
88- location : location
77+ location : AzureAiServiceLocation
8978 sku : {
9079 name : 'S0'
9180 }
@@ -121,7 +110,7 @@ module managedIdentityModule 'deploy_managed_identity.bicep' = {
121110 params : {
122111 miName :'${abbrs .security .managedIdentity }${ResourcePrefix }'
123112 solutionName : ResourcePrefix
124- solutionLocation : location
113+ solutionLocation : solutionLocation
125114 }
126115 scope : resourceGroup (resourceGroup ().name )
127116}
@@ -133,7 +122,7 @@ module kvault 'deploy_keyvault.bicep' = {
133122 params : {
134123 keyvaultName : '${abbrs .security .keyVault }${ResourcePrefix }'
135124 solutionName : ResourcePrefix
136- solutionLocation : location
125+ solutionLocation : solutionLocation
137126 managedIdentityObjectId :managedIdentityModule .outputs .managedIdentityOutput .objectId
138127 }
139128 scope : resourceGroup (resourceGroup ().name )
@@ -162,7 +151,7 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.9.1
162151 params : {
163152 logAnalyticsWorkspaceResourceId : azureAifoundry .outputs .logAnalyticsId
164153 name : toLower ('${ResourcePrefix }manenv' )
165- location : location
154+ location : solutionLocation
166155 zoneRedundant : false
167156 managedIdentities : managedIdentityModule
168157 }
@@ -175,7 +164,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account:0.9.0' =
175164 name : toLower ('${abbrs .databases .cosmosDBDatabase }${ResourcePrefix }databaseAccount' )
176165 // Non-required parameters
177166 enableAnalyticalStorage : true
178- location : dblocation
167+ location : solutionLocation
179168 managedIdentities : {
180169 systemAssigned : true
181170 userAssignedResourceIds : [
@@ -193,7 +182,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account:0.9.0' =
193182 {
194183 failoverPriority : 0
195184 isZoneRedundant : false
196- locationName : dblocation
185+ locationName : solutionLocation
197186 }
198187 ]
199188 sqlDatabases : [
@@ -268,14 +257,14 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.13.0' = {
268257 environmentResourceId : containerAppsEnvironment .outputs .resourceId
269258 name : toLower ('${abbrs .containers .containerApp }${ResourcePrefix }Frontend' )
270259 // Non-required parameters
271- location : location
260+ location : solutionLocation
272261 }
273262}
274263
275264
276265resource containerAppBackend 'Microsoft.App/containerApps@2023-05-01' = {
277266 name : toLower ('${abbrs .containers .containerApp }${ResourcePrefix }Backend' )
278- location : location
267+ location : solutionLocation
279268 identity : {
280269 type : 'SystemAssigned'
281270 }
@@ -393,7 +382,7 @@ resource containerAppBackend 'Microsoft.App/containerApps@2023-05-01' = {
393382}
394383resource storageContianerApp 'Microsoft.Storage/storageAccounts@2022-09-01' = {
395384 name : storageContainerName
396- location : location
385+ location : solutionLocation
397386 sku : {
398387 name : storageSkuName
399388 }
0 commit comments