Skip to content

Commit 2e912fe

Browse files
updated bicep for location
1 parent 91a9a9e commit 2e912fe

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

infra/main.bicep

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ param solutionUniqueText string = substring(uniqueString(subscription().id, reso
1818
param location string = ''
1919

2020
@minLength(3)
21-
@description('Optional. Secondary location for databases creation(example:eastus2):')
22-
param secondaryLocation string = 'eastus2'
21+
@description('Optional. Secondary location for databases creation(example:uksouth):')
22+
param secondaryLocation string = 'uksouth'
2323

2424
@allowed([
2525
'australiaeast'
@@ -887,7 +887,7 @@ module cosmosDB 'br/public:avm/res/document-db/database-account:0.15.0' = {
887887
{
888888
failoverPriority: 0
889889
isZoneRedundant: true
890-
locationName: solutionLocation
890+
locationName: secondaryLocation
891891
}
892892
{
893893
failoverPriority: 1
@@ -897,8 +897,9 @@ module cosmosDB 'br/public:avm/res/document-db/database-account:0.15.0' = {
897897
]
898898
: [
899899
{
900-
locationName: solutionLocation
900+
locationName: secondaryLocation
901901
failoverPriority: 0
902+
isZoneRedundant: enableRedundancy
902903
}
903904
]
904905
}

infra/main.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.37.4.10188",
9-
"templateHash": "10809335239895766797"
9+
"templateHash": "9170477337595245201"
1010
},
1111
"name": "Document Generation Solution Accelerator",
1212
"description": "CSA CTO Gold Standard Solution Accelerator for Document Generation.\n"
@@ -38,10 +38,10 @@
3838
},
3939
"secondaryLocation": {
4040
"type": "string",
41-
"defaultValue": "eastus2",
41+
"defaultValue": "uksouth",
4242
"minLength": 3,
4343
"metadata": {
44-
"description": "Optional. Secondary location for databases creation(example:eastus2):"
44+
"description": "Optional. Secondary location for databases creation(example:uksouth):"
4545
}
4646
},
4747
"aiDeploymentsLocation": {
@@ -29874,9 +29874,9 @@
2987429874
}
2987529875
},
2987629876
"dependsOn": [
29877+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2987729878
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
2987829879
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
29879-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2988029880
"logAnalyticsWorkspace",
2988129881
"network",
2988229882
"userAssignedIdentity"
@@ -38422,7 +38422,7 @@
3842238422
"zoneRedundant": "[if(parameters('enableRedundancy'), createObject('value', true()), createObject('value', false()))]",
3842338423
"capabilitiesToAdd": "[if(parameters('enableRedundancy'), createObject('value', null()), createObject('value', createArray('EnableServerless')))]",
3842438424
"automaticFailover": "[if(parameters('enableRedundancy'), createObject('value', true()), createObject('value', false()))]",
38425-
"failoverLocations": "[if(parameters('enableRedundancy'), createObject('value', createArray(createObject('failoverPriority', 0, 'isZoneRedundant', true(), 'locationName', variables('solutionLocation')), createObject('failoverPriority', 1, 'isZoneRedundant', true(), 'locationName', variables('cosmosDbHaLocation')))), createObject('value', createArray(createObject('locationName', variables('solutionLocation'), 'failoverPriority', 0))))]"
38425+
"failoverLocations": "[if(parameters('enableRedundancy'), createObject('value', createArray(createObject('failoverPriority', 0, 'isZoneRedundant', true(), 'locationName', parameters('secondaryLocation')), createObject('failoverPriority', 1, 'isZoneRedundant', true(), 'locationName', variables('cosmosDbHaLocation')))), createObject('value', createArray(createObject('locationName', parameters('secondaryLocation'), 'failoverPriority', 0, 'isZoneRedundant', parameters('enableRedundancy')))))]"
3842638426
},
3842738427
"template": {
3842838428
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",

0 commit comments

Comments
 (0)