@@ -70,7 +70,7 @@ param gptReasoningModelName string = 'o4-mini'
7070@description ('Optional. Version of the GPT Reasoning model to deploy. Defaults to 2025-04-16.' )
7171param gptReasoningModelVersion string = '2025-04-16'
7272
73- @description ('Optional. Version of the Azure OpenAI service to deploy. Defaults to 2025-01 -01-preview.' )
73+ @description ('Optional. Version of the Azure OpenAI service to deploy. Defaults to 2024-12 -01-preview.' )
7474param azureopenaiVersion string = '2024-12-01-preview'
7575
7676@description ('Optional. Version of the Azure AI Agent API version. Defaults to 2025-01-01-preview.' )
@@ -1338,7 +1338,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
13381338 }
13391339 {
13401340 name : 'AZURE_AI_SEARCH_ENDPOINT'
1341- value : searchService .outputs .endpoint
1341+ value : searchServiceUpdate .outputs .endpoint
13421342 }
13431343 {
13441344 name : 'AZURE_COGNITIVE_SERVICES'
@@ -1724,10 +1724,20 @@ var aiSearchIndexNameForRFPSummary = 'macae-rfp-summary-index'
17241724var aiSearchIndexNameForRFPRisk = 'macae-rfp-risk-index'
17251725var aiSearchIndexNameForRFPCompliance = 'macae-rfp-compliance-index'
17261726
1727- module searchService 'br/public:avm/res/search/search-service:0.11.1' = {
1728- name : take ('avm.res.search.search-service.${solutionSuffix }' , 64 )
1727+ resource searchService 'Microsoft.Search/searchServices@2024-06-01-preview' = {
1728+ name : searchServiceName
1729+ location : location
1730+ sku : {
1731+ name : enableScalability ? 'standard' : 'basic'
1732+ }
1733+ }
1734+
1735+ // Separate module for Search Service to enable managed identity and update other properties, as this reduces deployment time
1736+ module searchServiceUpdate 'br/public:avm/res/search/search-service:0.11.1' = {
1737+ name : take ('avm.res.search.update.${solutionSuffix }' , 64 )
17291738 params : {
17301739 name : searchServiceName
1740+ location : location
17311741 disableLocalAuth : true
17321742 hostingMode : 'default'
17331743 managedIdentities : {
@@ -1789,9 +1799,12 @@ module searchService 'br/public:avm/res/search/search-service:0.11.1' = {
17891799 // ]
17901800 // : []
17911801 }
1802+ dependsOn : [
1803+ searchService
1804+ ]
17921805}
17931806
1794- // ========== Search Service - AI Project Connection ========== //
1807+ // ========== Search Service - AI Project Connection ==========//
17951808
17961809var aiSearchConnectionName = 'aifp-srch-connection-${solutionSuffix }'
17971810module aiSearchFoundryConnection 'modules/aifp-connections.bicep' = {
@@ -1801,9 +1814,9 @@ module aiSearchFoundryConnection 'modules/aifp-connections.bicep' = {
18011814 aiFoundryProjectName : aiFoundryAiProjectName
18021815 aiFoundryName : aiFoundryAiServicesResourceName
18031816 aifSearchConnectionName : aiSearchConnectionName
1804- searchServiceResourceId : searchService .outputs . resourceId
1805- searchServiceLocation : searchService .outputs . location
1806- searchServiceName : searchService .outputs . name
1817+ searchServiceResourceId : searchService .id
1818+ searchServiceLocation : searchService .location
1819+ searchServiceName : searchService .name
18071820 }
18081821 dependsOn : [
18091822 aiFoundryAiServices
@@ -1871,8 +1884,8 @@ output webSiteDefaultHostname string = webSite.outputs.defaultHostname
18711884
18721885output AZURE_STORAGE_BLOB_URL string = avmStorageAccount .outputs .serviceEndpoints .blob
18731886output AZURE_STORAGE_ACCOUNT_NAME string = storageAccountName
1874- output AZURE_AI_SEARCH_ENDPOINT string = searchService .outputs .endpoint
1875- output AZURE_AI_SEARCH_NAME string = searchService .outputs . name
1887+ output AZURE_AI_SEARCH_ENDPOINT string = searchServiceUpdate .outputs .endpoint
1888+ output AZURE_AI_SEARCH_NAME string = searchService .name
18761889
18771890output COSMOSDB_ENDPOINT string = 'https://${cosmosDbResourceName }.documents.azure.com:443/'
18781891output COSMOSDB_DATABASE string = cosmosDbDatabaseName
@@ -1896,7 +1909,7 @@ output AI_FOUNDRY_RESOURCE_ID string = !useExistingAiFoundryAiProject
18961909 ? aiFoundryAiServices .outputs .resourceId
18971910 : existingAiFoundryAiProjectResourceId
18981911output COSMOSDB_ACCOUNT_NAME string = cosmosDbResourceName
1899- output AZURE_SEARCH_ENDPOINT string = searchService .outputs .endpoint
1912+ output AZURE_SEARCH_ENDPOINT string = searchServiceUpdate .outputs .endpoint
19001913output AZURE_CLIENT_ID string = userAssignedIdentity !.outputs .clientId
19011914output AZURE_TENANT_ID string = tenant ().tenantId
19021915output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
0 commit comments