Skip to content

Commit cabc3c8

Browse files
committed
added logic for secondaryLocation (not to be same with location)
1 parent eab22a9 commit cabc3c8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

infra/main.bicep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ param gptModelVersion string = '2024-08-06'
5353
param gptDeploymentCapacity int
5454

5555
@description('Optional. Location used for Azure Cosmos DB, Azure Container App deployment.')
56-
param secondaryLocation string = 'EastUs2'
56+
param secondaryLocation string = (location == 'eastus2') ? 'westus2' : 'eastus2'
5757

5858
@description('Optional. The public container image endpoint.')
5959
param publicContainerImageEndpoint string = 'cpscontainerreg.azurecr.io'
@@ -1786,9 +1786,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
17861786
}
17871787
]
17881788
disableLocalAuth: false
1789-
replicaLocations: [
1790-
secondaryLocation
1791-
]
1789+
replicaLocations: (resourceGroupLocation != secondaryLocation) ? [secondaryLocation] : []
17921790
roleAssignments: [
17931791
{
17941792
principalId: avmContainerApp.outputs.?systemAssignedMIPrincipalId!

0 commit comments

Comments
 (0)