Skip to content

Commit 2fa8579

Browse files
Update managed identity type and enhance allowed FQDN list for CosmosDB
1 parent ecd97cf commit 2fa8579

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

code/create_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ def conversation_with_data(conversation: Request, env_helper: EnvHelper):
199199
}
200200
if env_helper.is_auth_type_keys()
201201
else {
202-
"type": "system_assigned_managed_identity",
202+
"type": "user_assigned_managed_identity",
203+
"managed_identity_resource_id": env_helper.MANAGED_IDENTITY_RESOURCE_ID,
203204
}
204205
),
205206
"endpoint": env_helper.AZURE_SEARCH_SERVICE,

infra/main.bicep

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,13 @@ module openai 'modules/core/ai/cognitiveservices.bicep' = {
842842
deployments: openAiDeployments
843843
userAssignedResourceId: managedIdentityModule.outputs.resourceId
844844
restrictOutboundNetworkAccess: true
845-
allowedFqdnList: [
846-
'${storageAccountName}.blob.${environment().suffixes.storage}'
847-
'${storageAccountName}.queue.${environment().suffixes.storage}'
848-
]
845+
allowedFqdnList: concat(
846+
[
847+
'${storageAccountName}.blob.${environment().suffixes.storage}'
848+
'${storageAccountName}.queue.${environment().suffixes.storage}'
849+
],
850+
databaseType == 'CosmosDB' ? ['${azureAISearchName}.search.windows.net'] : []
851+
)
849852
enablePrivateNetworking: enablePrivateNetworking
850853
enableMonitoring: enableMonitoring
851854
enableTelemetry: enableTelemetry

0 commit comments

Comments
 (0)