Skip to content

Commit c46593d

Browse files
Update API endpoint retrieval to handle potential null values and adjust dependency scope in Cognitive Services module
1 parent 6d23261 commit c46593d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

infra/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
11031103
}
11041104
{
11051105
name: 'APP_AI_PROJECT_ENDPOINT'
1106-
value: avmAiServices.outputs.aiProjectInfo.apiEndpoint
1106+
value: avmAiServices.outputs.aiProjectInfo.?apiEndpoint ?? ''
11071107
}
11081108
{
11091109
name: 'APP_COSMOS_CONNSTR'

infra/main.json

Lines changed: 3 additions & 3 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": "5583509537249625128"
9+
"templateHash": "10090938439711679479"
1010
},
1111
"name": "Content Processing Solution Accelerator",
1212
"description": "Bicep template to deploy the Content Processing Solution Accelerator with AVM compliance."
@@ -38710,10 +38710,10 @@
3871038710
"dependsOn": [
3871138711
"avmContainerApp",
3871238712
"avmManagedIdentity",
38713-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
3871438713
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
3871538714
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
3871638715
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]",
38716+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
3871738717
"logAnalyticsWorkspace",
3871838718
"virtualNetwork"
3871938719
]
@@ -51067,7 +51067,7 @@
5106751067
},
5106851068
{
5106951069
"name": "APP_AI_PROJECT_ENDPOINT",
51070-
"value": "[reference('avmAiServices').outputs.aiProjectInfo.value.apiEndpoint]"
51070+
"value": "[coalesce(tryGet(reference('avmAiServices').outputs.aiProjectInfo.value, 'apiEndpoint'), '')]"
5107151071
},
5107251072
{
5107351073
"name": "APP_COSMOS_CONNSTR",

infra/modules/account/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ module cognitive_service_dependencies './modules/dependencies.bicep' = if(!useEx
269269
sku: sku
270270
tags: tags
271271
}
272+
scope: resourceGroup()
272273
}
273274

274275
module existing_cognitive_service_dependencies './modules/dependencies.bicep' = if(useExistingService) {

0 commit comments

Comments
 (0)