Skip to content

Commit 43a60c1

Browse files
feat: Update AI service location references in configuration files
1 parent a808dcc commit 43a60c1

3 files changed

Lines changed: 6 additions & 17 deletions

File tree

content-gen/azure.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ hooks:
6666
Write-Host "AI Search Index: " -NoNewline
6767
Write-Host "$env:AZURE_AI_SEARCH_PRODUCTS_INDEX" -ForegroundColor Cyan
6868
Write-Host "AI Service Location: " -NoNewline
69-
Write-Host "$env:AI_SERVICE_LOCATION" -ForegroundColor Cyan
69+
Write-Host "$env:AZURE_ENV_OPENAI_LOCATION" -ForegroundColor Cyan
7070
Write-Host "Container Instance: " -NoNewline
7171
Write-Host "$env:CONTAINER_INSTANCE_NAME" -ForegroundColor Cyan
7272
@@ -112,7 +112,7 @@ hooks:
112112
echo "Storage Account: $AZURE_BLOB_ACCOUNT_NAME"
113113
echo "AI Search Service: $AI_SEARCH_SERVICE_NAME"
114114
echo "AI Search Index: $AZURE_AI_SEARCH_PRODUCTS_INDEX"
115-
echo "AI Service Location: $AI_SERVICE_LOCATION"
115+
echo "AI Service Location: $AZURE_ENV_OPENAI_LOCATION"
116116
echo "Container Instance: $CONTAINER_INSTANCE_NAME"
117117
118118
echo ""

content-gen/infra/main.bicep

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,6 @@ var aiServiceRegionFallback = {
190190
westus3: 'westus3'
191191
}
192192

193-
// Determine effective AI service location:
194-
// 1. If explicitly set via parameter, use that (user override)
195-
// 2. If main location is valid for AI services, use it
196-
// 3. Otherwise, use the fallback mapping
197-
var requestedAiLocation = empty(azureAiServiceLocation) ? solutionLocation : azureAiServiceLocation
198-
var aiServiceLocation = contains(validAiServiceRegions, requestedAiLocation)
199-
? requestedAiLocation
200-
: (aiServiceRegionFallback[?solutionLocation] ?? 'eastus2')
201-
202193
// acrName is required - points to existing ACR with pre-built images
203194
var acrResourceName = acrName
204195
var solutionSuffix = toLower(trim(replace(
@@ -1014,7 +1005,7 @@ output AZURE_AI_AGENT_API_VERSION string = azureAiAgentApiVersion
10141005
output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = (enableMonitoring && !useExistingLogAnalytics) ? applicationInsights!.outputs.connectionString : ''
10151006

10161007
@description('Contains the location used for AI Services deployment')
1017-
output AI_SERVICE_LOCATION string = azureAiServiceLocation
1008+
output AZURE_ENV_OPENAI_LOCATION string = azureAiServiceLocation
10181009

10191010
@description('Contains Container Instance Name')
10201011
output CONTAINER_INSTANCE_NAME string = containerInstance.outputs.name

content-gen/infra/main.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.40.2.10011",
9-
"templateHash": "16442623120600133305"
9+
"templateHash": "9008126217899627179"
1010
},
1111
"name": "Intelligent Content Generation Accelerator",
1212
"description": "Solution Accelerator for multimodal marketing content generation using Microsoft Agent Framework.\n"
@@ -289,8 +289,6 @@
289289
"westus2": "westus",
290290
"westus3": "westus3"
291291
},
292-
"requestedAiLocation": "[if(empty(parameters('azureAiServiceLocation')), variables('solutionLocation'), parameters('azureAiServiceLocation'))]",
293-
"aiServiceLocation": "[if(contains(variables('validAiServiceRegions'), variables('requestedAiLocation')), variables('requestedAiLocation'), coalesce(tryGet(variables('aiServiceRegionFallback'), variables('solutionLocation')), 'eastus2'))]",
294292
"acrResourceName": "[parameters('acrName')]",
295293
"solutionSuffix": "[toLower(trim(replace(replace(replace(replace(replace(replace(format('{0}{1}', parameters('solutionName'), parameters('solutionUniqueText')), '-', ''), '_', ''), '.', ''), '/', ''), ' ', ''), '*', '')))]",
296294
"cosmosDbZoneRedundantHaRegionPairs": {
@@ -14079,8 +14077,8 @@
1407914077
},
1408014078
"dependsOn": [
1408114079
"aiFoundryAiServices",
14082-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
1408314080
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
14081+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
1408414082
"virtualNetwork"
1408514083
]
1408614084
},
@@ -33809,7 +33807,7 @@
3380933807
},
3381033808
"value": "[if(and(parameters('enableMonitoring'), not(variables('useExistingLogAnalytics'))), reference('applicationInsights').outputs.connectionString.value, '')]"
3381133809
},
33812-
"AI_SERVICE_LOCATION": {
33810+
"AZURE_ENV_OPENAI_LOCATION": {
3381333811
"type": "string",
3381433812
"metadata": {
3381533813
"description": "Contains the location used for AI Services deployment"

0 commit comments

Comments
 (0)