Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
}
{
name: 'Application:Services:AzureAISearch:Endpoint'
value: 'https://${avmSearchSearchServices.outputs.name}.search.windows.net'
value: 'https://${avmSearchSearchServices.name}.search.windows.net'
}
{
name: 'KernelMemory:Services:AzureAIDocIntel:Auth'
Expand All @@ -581,7 +581,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
}
{
name: 'KernelMemory:Services:AzureAISearch:Endpoint'
value: 'https://${avmSearchSearchServices.outputs.name}.search.windows.net'
value: 'https://${avmSearchSearchServices.name}.search.windows.net'
}
{
name: 'KernelMemory:Services:AzureBlobs:Account'
Expand Down Expand Up @@ -744,8 +744,17 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {

// ========== AI Foundry: AI Search ========== //
var aiSearchName = 'srch-${solutionSuffix}'
module avmSearchSearchServices 'br/public:avm/res/search/search-service:0.11.1' = {
name: take('avm.res.cognitive-search-services.${aiSearchName}', 64)
resource avmSearchSearchServices 'Microsoft.Search/searchServices@2024-06-01-preview' = {
name: aiSearchName
location: solutionLocation
sku: {
name: enableScalability ? 'standard' : 'basic'
}
}

// Separate module for Search Service to enable managed identity and update other properties, as this reduces deployment time
module avmSearchSearchServicesUpdate 'br/public:avm/res/search/search-service:0.11.1' = {
name: take('avm.res.search-services-identity.${aiSearchName}', 64)
params: {
name: aiSearchName
tags: tags
Expand Down Expand Up @@ -790,6 +799,9 @@ module avmSearchSearchServices 'br/public:avm/res/search/search-service:0.11.1'
]
: []
}
dependsOn: [
avmSearchSearchServices
]
}

// ========== Cognitive Services - OpenAI module ========== //
Expand Down Expand Up @@ -1042,7 +1054,7 @@ output AZURE_COGNITIVE_SERVICE_NAME string = documentIntelligence.outputs.name
output AZURE_COGNITIVE_SERVICE_ENDPOINT string = documentIntelligence.outputs.endpoint

@description('Contains Azure Search Service Name.')
output AZURE_SEARCH_SERVICE_NAME string = avmSearchSearchServices.outputs.name
output AZURE_SEARCH_SERVICE_NAME string = avmSearchSearchServices.name

@description('Contains Azure AKS Name.')
output AZURE_AKS_NAME string = managedCluster.outputs.name
Expand All @@ -1060,7 +1072,7 @@ output AZURE_OPENAI_SERVICE_NAME string = avmOpenAi.outputs.name
output AZURE_OPENAI_SERVICE_ENDPOINT string = avmOpenAi.outputs.endpoint

@description('Contains Azure Search Service Endpoint.')
output AZ_SEARCH_SERVICE_ENDPOINT string = avmSearchSearchServices.outputs.name
output AZ_SEARCH_SERVICE_ENDPOINT string = avmSearchSearchServices.name

@description('Contains Azure GPT-4o Model Deployment Name.')
output AZ_GPT4O_MODEL_ID string = gptModelDeployment.deploymentName
Expand Down
74 changes: 42 additions & 32 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.36.177.2456",
"templateHash": "16347082498493141517"
"version": "0.40.2.10011",
"templateHash": "8417814553440700358"
}
},
"parameters": {
Expand Down Expand Up @@ -302,6 +302,15 @@
"tags": "[shallowMerge(createArray(resourceGroup().tags, parameters('tags'), createObject('TemplateName', 'DKM', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy'), 'DeploymentName', deployment().name)))]"
}
},
"avmSearchSearchServices": {
"type": "Microsoft.Search/searchServices",
"apiVersion": "2024-06-01-preview",
"name": "[variables('aiSearchName')]",
"location": "[variables('solutionLocation')]",
"sku": {
"name": "[if(parameters('enableScalability'), 'standard', 'basic')]"
}
},
"avmPrivateDnsZones": {
"copy": {
"name": "avmPrivateDnsZones",
Expand All @@ -311,7 +320,7 @@
},
"condition": "[parameters('enablePrivateNetworking')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[format('dns-zone-{0}', copyIndex())]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -3478,7 +3487,7 @@
"logAnalyticsWorkspace": {
"condition": "[and(parameters('enableMonitoring'), not(variables('useExistingLogAnalytics')))]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.operational-insights.workspace.{0}', variables('logAnalyticsWorkspaceResourceName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -6584,7 +6593,7 @@
"virtualNetwork": {
"condition": "[parameters('enablePrivateNetworking')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('module.virtualNetwork.{0}', variables('solutionSuffix')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -6621,8 +6630,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.36.177.2456",
"templateHash": "7116469417351280182"
"version": "0.40.2.10011",
"templateHash": "5819780095460630914"
}
},
"definitions": {
Expand Down Expand Up @@ -7041,7 +7050,7 @@
},
"condition": "[not(empty(tryGet(parameters('subnets')[copyIndex()], 'networkSecurityGroup')))]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.network.network-security-group.{0}.{1}', tryGet(parameters('subnets')[copyIndex()], 'networkSecurityGroup', 'name'), parameters('resourceSuffix')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -7693,7 +7702,7 @@
},
"virtualNetwork": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.network.virtual-network.{0}', parameters('name')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -9424,7 +9433,7 @@
"bastionHost": {
"condition": "[parameters('enablePrivateNetworking')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.network.bastion-host.{0}', variables('bastionHostName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -10743,7 +10752,7 @@
"jumpboxVM": {
"condition": "[parameters('enablePrivateNetworking')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.compute.virtual-machine.{0}', variables('jumpboxVmName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -19086,7 +19095,7 @@
},
"userAssignedIdentity": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.managed-identity.user-assigned-identity.{0}', variables('userAssignedIdentityResourceName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -19568,7 +19577,7 @@
},
"avmContainerRegistry": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[format('avmContainerRegistry-{0}', uniqueString('avmContainerRegistry', deployment().name))]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -19611,8 +19620,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.36.177.2456",
"templateHash": "11092248228709008584"
"version": "0.40.2.10011",
"templateHash": "11752366541769527004"
},
"name": "Container Registry Module"
},
Expand Down Expand Up @@ -19748,7 +19757,7 @@
"resources": {
"avmContainerRegistry": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[parameters('acrName')]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -22817,7 +22826,7 @@
},
"avmCosmosDB": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.cosmos-{0}', variables('solutionSuffix')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -26651,7 +26660,7 @@
},
"avmAppConfig": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.app-configuration.configuration-store.{0}', variables('appConfigName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -26723,11 +26732,11 @@
},
{
"name": "Application:Services:PersistentStorage:CosmosMongo:ConnectionString",
"value": "[listOutputsWithSecureValues('avmCosmosDB', '2022-09-01').primaryReadWriteConnectionString]"
"value": "[listOutputsWithSecureValues('avmCosmosDB', '2025-04-01').primaryReadWriteConnectionString]"
},
{
"name": "Application:Services:AzureAISearch:Endpoint",
"value": "[format('https://{0}.search.windows.net', reference('avmSearchSearchServices').outputs.name.value)]"
"value": "[format('https://{0}.search.windows.net', variables('aiSearchName'))]"
},
{
"name": "KernelMemory:Services:AzureAIDocIntel:Auth",
Expand All @@ -26743,7 +26752,7 @@
},
{
"name": "KernelMemory:Services:AzureAISearch:Endpoint",
"value": "[format('https://{0}.search.windows.net', reference('avmSearchSearchServices').outputs.name.value)]"
"value": "[format('https://{0}.search.windows.net', variables('aiSearchName'))]"
},
{
"name": "KernelMemory:Services:AzureBlobs:Account",
Expand Down Expand Up @@ -28780,7 +28789,7 @@
"avmAppConfigUpdated": {
"condition": "[parameters('enablePrivateNetworking')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.app-configuration.configuration-store-update.{0}', variables('appConfigName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -30795,7 +30804,7 @@
},
"avmStorageAccount": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.storage.storage-account.{0}', variables('storageAccountName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -36558,10 +36567,10 @@
"virtualNetwork"
]
},
"avmSearchSearchServices": {
"avmSearchSearchServicesUpdate": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[take(format('avm.res.cognitive-search-services.{0}', variables('aiSearchName')), 64)]",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.search-services-identity.{0}', variables('aiSearchName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
Expand Down Expand Up @@ -38905,14 +38914,15 @@
},
"dependsOn": [
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').search)]",
"avmSearchSearchServices",
"logAnalyticsWorkspace",
"userAssignedIdentity",
"virtualNetwork"
]
},
"avmOpenAi": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.cognitiveservices.account.{0}', variables('openAiAccountName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -41511,7 +41521,7 @@
},
"documentIntelligence": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.cognitiveservices.account.{0}', variables('docIntelAccountName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -44099,7 +44109,7 @@
},
"managedCluster": {
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.container-service.managed-cluster.aks-{0}', variables('solutionSuffix')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -47436,7 +47446,7 @@
"applicationInsights": {
"condition": "[parameters('enableMonitoring')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"apiVersion": "2025-04-01",
"name": "[take(format('avm.res.insights.component.{0}', variables('applicationInsightsResourceName')), 64)]",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -48248,7 +48258,7 @@
"metadata": {
"description": "Contains Azure Search Service Name."
},
"value": "[reference('avmSearchSearchServices').outputs.name.value]"
"value": "[variables('aiSearchName')]"
},
"AZURE_AKS_NAME": {
"type": "string",
Expand Down Expand Up @@ -48290,7 +48300,7 @@
"metadata": {
"description": "Contains Azure Search Service Endpoint."
},
"value": "[reference('avmSearchSearchServices').outputs.name.value]"
"value": "[variables('aiSearchName')]"
},
"AZ_GPT4O_MODEL_ID": {
"type": "string",
Expand Down