@@ -565,7 +565,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
565565 }
566566 {
567567 name : 'Application:Services:AzureAISearch:Endpoint'
568- value : 'https://${avmSearchSearchServices .outputs . name }.search.windows.net'
568+ value : 'https://${avmSearchSearchServices .name }.search.windows.net'
569569 }
570570 {
571571 name : 'KernelMemory:Services:AzureAIDocIntel:Auth'
@@ -581,7 +581,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
581581 }
582582 {
583583 name : 'KernelMemory:Services:AzureAISearch:Endpoint'
584- value : 'https://${avmSearchSearchServices .outputs . name }.search.windows.net'
584+ value : 'https://${avmSearchSearchServices .name }.search.windows.net'
585585 }
586586 {
587587 name : 'KernelMemory:Services:AzureBlobs:Account'
@@ -744,55 +744,16 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {
744744
745745// ========== AI Foundry: AI Search ========== //
746746var aiSearchName = 'srch-${solutionSuffix }'
747- module avmSearchSearchServices 'br/public:avm/res/search/search-service:0.11.1' = {
748- name : take ('avm.res.cognitive-search-services.${aiSearchName }' , 64 )
749- params : {
750- name : aiSearchName
751- tags : tags
752- location : solutionLocation
753- enableTelemetry : enableTelemetry
754- diagnosticSettings : enableMonitoring ? [{ workspaceResourceId : logAnalyticsWorkspaceResourceId }] : null
755- sku : enableScalability ? 'standard' : 'basic'
756- replicaCount : 1
757- partitionCount : 1
758- roleAssignments : [
759- {
760- roleDefinitionIdOrName : 'Search Index Data Contributor' // Cognitive Search Contributor
761- principalId : userAssignedIdentity .outputs .principalId
762- principalType : 'ServicePrincipal'
763- }
764- {
765- roleDefinitionIdOrName : 'Search Index Data Reader' //'5e0bd9bd-7b93-4f28-af87-19fc36ad61bd'// Cognitive Services OpenAI User
766- principalId : userAssignedIdentity .outputs .principalId
767- principalType : 'ServicePrincipal'
768- }
769- ]
770- semanticSearch : 'free'
771- // secretsExportConfiguration: {
772- // keyVaultResourceId: keyvault.outputs.resourceId
773- // primaryAdminKeyName: varKvSecretNameAzureSearchKey
774- // }
775- // WAF aligned configuration for Private Networking
776- publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
777- privateEndpoints : enablePrivateNetworking
778- ? [
779- {
780- name : 'pep-${aiSearchName }'
781- customNetworkInterfaceName : 'nic-${aiSearchName }'
782- privateDnsZoneGroup : {
783- privateDnsZoneGroupConfigs : [
784- { privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .search ]!.outputs .resourceId }
785- ]
786- }
787- subnetResourceId : virtualNetwork !.outputs .pepsSubnetResourceId
788- }
789- ]
790- : []
747+ resource avmSearchSearchServices 'Microsoft.Search/searchServices@2024-06-01-preview' = {
748+ name : aiSearchName
749+ location : solutionLocation
750+ sku : {
751+ name : enableScalability ? 'standard' : 'basic'
791752 }
792753}
793754
794- // Separate module for Search Service to enable managed identity, as this reduces deployment time
795- module avmSearchSearchServicesEnableIdentity 'br/public:avm/res/search/search-service:0.11.1' = {
755+ // Separate module for Search Service to enable managed identity and update other properties , as this reduces deployment time
756+ module avmSearchSearchServicesUpdate 'br/public:avm/res/search/search-service:0.11.1' = {
796757 name : take ('avm.res.search-services-identity.${aiSearchName }' , 64 )
797758 params : {
798759 name : aiSearchName
@@ -1093,7 +1054,7 @@ output AZURE_COGNITIVE_SERVICE_NAME string = documentIntelligence.outputs.name
10931054output AZURE_COGNITIVE_SERVICE_ENDPOINT string = documentIntelligence .outputs .endpoint
10941055
10951056@description ('Contains Azure Search Service Name.' )
1096- output AZURE_SEARCH_SERVICE_NAME string = avmSearchSearchServices .outputs . name
1057+ output AZURE_SEARCH_SERVICE_NAME string = avmSearchSearchServices .name
10971058
10981059@description ('Contains Azure AKS Name.' )
10991060output AZURE_AKS_NAME string = managedCluster .outputs .name
@@ -1111,7 +1072,7 @@ output AZURE_OPENAI_SERVICE_NAME string = avmOpenAi.outputs.name
11111072output AZURE_OPENAI_SERVICE_ENDPOINT string = avmOpenAi .outputs .endpoint
11121073
11131074@description ('Contains Azure Search Service Endpoint.' )
1114- output AZ_SEARCH_SERVICE_ENDPOINT string = avmSearchSearchServices .outputs . name
1075+ output AZ_SEARCH_SERVICE_ENDPOINT string = avmSearchSearchServices .name
11151076
11161077@description ('Contains Azure GPT-4o Model Deployment Name.' )
11171078output AZ_GPT4O_MODEL_ID string = gptModelDeployment .deploymentName
0 commit comments