Skip to content

Commit a5e8780

Browse files
Merge pull request #555 from microsoft/dev
chore: Dev to main
2 parents 9314c1f + 4e5e732 commit a5e8780

File tree

2 files changed

+60
-38
lines changed

2 files changed

+60
-38
lines changed

infra/main.bicep

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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,8 +744,17 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {
744744

745745
// ========== AI Foundry: AI Search ========== //
746746
var 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)
747+
resource avmSearchSearchServices 'Microsoft.Search/searchServices@2024-06-01-preview' = {
748+
name: aiSearchName
749+
location: solutionLocation
750+
sku: {
751+
name: enableScalability ? 'standard' : 'basic'
752+
}
753+
}
754+
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' = {
757+
name: take('avm.res.search-services-identity.${aiSearchName}', 64)
749758
params: {
750759
name: aiSearchName
751760
tags: tags
@@ -790,6 +799,9 @@ module avmSearchSearchServices 'br/public:avm/res/search/search-service:0.11.1'
790799
]
791800
: []
792801
}
802+
dependsOn: [
803+
avmSearchSearchServices
804+
]
793805
}
794806

795807
// ========== Cognitive Services - OpenAI module ========== //
@@ -1042,7 +1054,7 @@ output AZURE_COGNITIVE_SERVICE_NAME string = documentIntelligence.outputs.name
10421054
output AZURE_COGNITIVE_SERVICE_ENDPOINT string = documentIntelligence.outputs.endpoint
10431055

10441056
@description('Contains Azure Search Service Name.')
1045-
output AZURE_SEARCH_SERVICE_NAME string = avmSearchSearchServices.outputs.name
1057+
output AZURE_SEARCH_SERVICE_NAME string = avmSearchSearchServices.name
10461058

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

10621074
@description('Contains Azure Search Service Endpoint.')
1063-
output AZ_SEARCH_SERVICE_ENDPOINT string = avmSearchSearchServices.outputs.name
1075+
output AZ_SEARCH_SERVICE_ENDPOINT string = avmSearchSearchServices.name
10641076

10651077
@description('Contains Azure GPT-4o Model Deployment Name.')
10661078
output AZ_GPT4O_MODEL_ID string = gptModelDeployment.deploymentName

infra/main.json

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.36.177.2456",
9-
"templateHash": "16347082498493141517"
8+
"version": "0.40.2.10011",
9+
"templateHash": "8417814553440700358"
1010
}
1111
},
1212
"parameters": {
@@ -302,6 +302,15 @@
302302
"tags": "[shallowMerge(createArray(resourceGroup().tags, parameters('tags'), createObject('TemplateName', 'DKM', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy'), 'DeploymentName', deployment().name)))]"
303303
}
304304
},
305+
"avmSearchSearchServices": {
306+
"type": "Microsoft.Search/searchServices",
307+
"apiVersion": "2024-06-01-preview",
308+
"name": "[variables('aiSearchName')]",
309+
"location": "[variables('solutionLocation')]",
310+
"sku": {
311+
"name": "[if(parameters('enableScalability'), 'standard', 'basic')]"
312+
}
313+
},
305314
"avmPrivateDnsZones": {
306315
"copy": {
307316
"name": "avmPrivateDnsZones",
@@ -311,7 +320,7 @@
311320
},
312321
"condition": "[parameters('enablePrivateNetworking')]",
313322
"type": "Microsoft.Resources/deployments",
314-
"apiVersion": "2022-09-01",
323+
"apiVersion": "2025-04-01",
315324
"name": "[format('dns-zone-{0}', copyIndex())]",
316325
"properties": {
317326
"expressionEvaluationOptions": {
@@ -3478,7 +3487,7 @@
34783487
"logAnalyticsWorkspace": {
34793488
"condition": "[and(parameters('enableMonitoring'), not(variables('useExistingLogAnalytics')))]",
34803489
"type": "Microsoft.Resources/deployments",
3481-
"apiVersion": "2022-09-01",
3490+
"apiVersion": "2025-04-01",
34823491
"name": "[take(format('avm.res.operational-insights.workspace.{0}', variables('logAnalyticsWorkspaceResourceName')), 64)]",
34833492
"properties": {
34843493
"expressionEvaluationOptions": {
@@ -6584,7 +6593,7 @@
65846593
"virtualNetwork": {
65856594
"condition": "[parameters('enablePrivateNetworking')]",
65866595
"type": "Microsoft.Resources/deployments",
6587-
"apiVersion": "2022-09-01",
6596+
"apiVersion": "2025-04-01",
65886597
"name": "[take(format('module.virtualNetwork.{0}', variables('solutionSuffix')), 64)]",
65896598
"properties": {
65906599
"expressionEvaluationOptions": {
@@ -6621,8 +6630,8 @@
66216630
"metadata": {
66226631
"_generator": {
66236632
"name": "bicep",
6624-
"version": "0.36.177.2456",
6625-
"templateHash": "7116469417351280182"
6633+
"version": "0.40.2.10011",
6634+
"templateHash": "5819780095460630914"
66266635
}
66276636
},
66286637
"definitions": {
@@ -7041,7 +7050,7 @@
70417050
},
70427051
"condition": "[not(empty(tryGet(parameters('subnets')[copyIndex()], 'networkSecurityGroup')))]",
70437052
"type": "Microsoft.Resources/deployments",
7044-
"apiVersion": "2022-09-01",
7053+
"apiVersion": "2025-04-01",
70457054
"name": "[take(format('avm.res.network.network-security-group.{0}.{1}', tryGet(parameters('subnets')[copyIndex()], 'networkSecurityGroup', 'name'), parameters('resourceSuffix')), 64)]",
70467055
"properties": {
70477056
"expressionEvaluationOptions": {
@@ -7693,7 +7702,7 @@
76937702
},
76947703
"virtualNetwork": {
76957704
"type": "Microsoft.Resources/deployments",
7696-
"apiVersion": "2022-09-01",
7705+
"apiVersion": "2025-04-01",
76977706
"name": "[take(format('avm.res.network.virtual-network.{0}', parameters('name')), 64)]",
76987707
"properties": {
76997708
"expressionEvaluationOptions": {
@@ -9424,7 +9433,7 @@
94249433
"bastionHost": {
94259434
"condition": "[parameters('enablePrivateNetworking')]",
94269435
"type": "Microsoft.Resources/deployments",
9427-
"apiVersion": "2022-09-01",
9436+
"apiVersion": "2025-04-01",
94289437
"name": "[take(format('avm.res.network.bastion-host.{0}', variables('bastionHostName')), 64)]",
94299438
"properties": {
94309439
"expressionEvaluationOptions": {
@@ -10743,7 +10752,7 @@
1074310752
"jumpboxVM": {
1074410753
"condition": "[parameters('enablePrivateNetworking')]",
1074510754
"type": "Microsoft.Resources/deployments",
10746-
"apiVersion": "2022-09-01",
10755+
"apiVersion": "2025-04-01",
1074710756
"name": "[take(format('avm.res.compute.virtual-machine.{0}', variables('jumpboxVmName')), 64)]",
1074810757
"properties": {
1074910758
"expressionEvaluationOptions": {
@@ -19086,7 +19095,7 @@
1908619095
},
1908719096
"userAssignedIdentity": {
1908819097
"type": "Microsoft.Resources/deployments",
19089-
"apiVersion": "2022-09-01",
19098+
"apiVersion": "2025-04-01",
1909019099
"name": "[take(format('avm.res.managed-identity.user-assigned-identity.{0}', variables('userAssignedIdentityResourceName')), 64)]",
1909119100
"properties": {
1909219101
"expressionEvaluationOptions": {
@@ -19568,7 +19577,7 @@
1956819577
},
1956919578
"avmContainerRegistry": {
1957019579
"type": "Microsoft.Resources/deployments",
19571-
"apiVersion": "2022-09-01",
19580+
"apiVersion": "2025-04-01",
1957219581
"name": "[format('avmContainerRegistry-{0}', uniqueString('avmContainerRegistry', deployment().name))]",
1957319582
"properties": {
1957419583
"expressionEvaluationOptions": {
@@ -19611,8 +19620,8 @@
1961119620
"metadata": {
1961219621
"_generator": {
1961319622
"name": "bicep",
19614-
"version": "0.36.177.2456",
19615-
"templateHash": "11092248228709008584"
19623+
"version": "0.40.2.10011",
19624+
"templateHash": "11752366541769527004"
1961619625
},
1961719626
"name": "Container Registry Module"
1961819627
},
@@ -19748,7 +19757,7 @@
1974819757
"resources": {
1974919758
"avmContainerRegistry": {
1975019759
"type": "Microsoft.Resources/deployments",
19751-
"apiVersion": "2022-09-01",
19760+
"apiVersion": "2025-04-01",
1975219761
"name": "[parameters('acrName')]",
1975319762
"properties": {
1975419763
"expressionEvaluationOptions": {
@@ -22817,7 +22826,7 @@
2281722826
},
2281822827
"avmCosmosDB": {
2281922828
"type": "Microsoft.Resources/deployments",
22820-
"apiVersion": "2022-09-01",
22829+
"apiVersion": "2025-04-01",
2282122830
"name": "[take(format('avm.res.cosmos-{0}', variables('solutionSuffix')), 64)]",
2282222831
"properties": {
2282322832
"expressionEvaluationOptions": {
@@ -26651,7 +26660,7 @@
2665126660
},
2665226661
"avmAppConfig": {
2665326662
"type": "Microsoft.Resources/deployments",
26654-
"apiVersion": "2022-09-01",
26663+
"apiVersion": "2025-04-01",
2665526664
"name": "[take(format('avm.res.app-configuration.configuration-store.{0}', variables('appConfigName')), 64)]",
2665626665
"properties": {
2665726666
"expressionEvaluationOptions": {
@@ -26723,11 +26732,11 @@
2672326732
},
2672426733
{
2672526734
"name": "Application:Services:PersistentStorage:CosmosMongo:ConnectionString",
26726-
"value": "[listOutputsWithSecureValues('avmCosmosDB', '2022-09-01').primaryReadWriteConnectionString]"
26735+
"value": "[listOutputsWithSecureValues('avmCosmosDB', '2025-04-01').primaryReadWriteConnectionString]"
2672726736
},
2672826737
{
2672926738
"name": "Application:Services:AzureAISearch:Endpoint",
26730-
"value": "[format('https://{0}.search.windows.net', reference('avmSearchSearchServices').outputs.name.value)]"
26739+
"value": "[format('https://{0}.search.windows.net', variables('aiSearchName'))]"
2673126740
},
2673226741
{
2673326742
"name": "KernelMemory:Services:AzureAIDocIntel:Auth",
@@ -26743,7 +26752,7 @@
2674326752
},
2674426753
{
2674526754
"name": "KernelMemory:Services:AzureAISearch:Endpoint",
26746-
"value": "[format('https://{0}.search.windows.net', reference('avmSearchSearchServices').outputs.name.value)]"
26755+
"value": "[format('https://{0}.search.windows.net', variables('aiSearchName'))]"
2674726756
},
2674826757
{
2674926758
"name": "KernelMemory:Services:AzureBlobs:Account",
@@ -28780,7 +28789,7 @@
2878028789
"avmAppConfigUpdated": {
2878128790
"condition": "[parameters('enablePrivateNetworking')]",
2878228791
"type": "Microsoft.Resources/deployments",
28783-
"apiVersion": "2022-09-01",
28792+
"apiVersion": "2025-04-01",
2878428793
"name": "[take(format('avm.res.app-configuration.configuration-store-update.{0}', variables('appConfigName')), 64)]",
2878528794
"properties": {
2878628795
"expressionEvaluationOptions": {
@@ -30795,7 +30804,7 @@
3079530804
},
3079630805
"avmStorageAccount": {
3079730806
"type": "Microsoft.Resources/deployments",
30798-
"apiVersion": "2022-09-01",
30807+
"apiVersion": "2025-04-01",
3079930808
"name": "[take(format('avm.res.storage.storage-account.{0}', variables('storageAccountName')), 64)]",
3080030809
"properties": {
3080130810
"expressionEvaluationOptions": {
@@ -36558,10 +36567,10 @@
3655836567
"virtualNetwork"
3655936568
]
3656036569
},
36561-
"avmSearchSearchServices": {
36570+
"avmSearchSearchServicesUpdate": {
3656236571
"type": "Microsoft.Resources/deployments",
36563-
"apiVersion": "2022-09-01",
36564-
"name": "[take(format('avm.res.cognitive-search-services.{0}', variables('aiSearchName')), 64)]",
36572+
"apiVersion": "2025-04-01",
36573+
"name": "[take(format('avm.res.search-services-identity.{0}', variables('aiSearchName')), 64)]",
3656536574
"properties": {
3656636575
"expressionEvaluationOptions": {
3656736576
"scope": "inner"
@@ -38905,14 +38914,15 @@
3890538914
},
3890638915
"dependsOn": [
3890738916
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').search)]",
38917+
"avmSearchSearchServices",
3890838918
"logAnalyticsWorkspace",
3890938919
"userAssignedIdentity",
3891038920
"virtualNetwork"
3891138921
]
3891238922
},
3891338923
"avmOpenAi": {
3891438924
"type": "Microsoft.Resources/deployments",
38915-
"apiVersion": "2022-09-01",
38925+
"apiVersion": "2025-04-01",
3891638926
"name": "[take(format('avm.res.cognitiveservices.account.{0}', variables('openAiAccountName')), 64)]",
3891738927
"properties": {
3891838928
"expressionEvaluationOptions": {
@@ -41511,7 +41521,7 @@
4151141521
},
4151241522
"documentIntelligence": {
4151341523
"type": "Microsoft.Resources/deployments",
41514-
"apiVersion": "2022-09-01",
41524+
"apiVersion": "2025-04-01",
4151541525
"name": "[take(format('avm.res.cognitiveservices.account.{0}', variables('docIntelAccountName')), 64)]",
4151641526
"properties": {
4151741527
"expressionEvaluationOptions": {
@@ -44099,7 +44109,7 @@
4409944109
},
4410044110
"managedCluster": {
4410144111
"type": "Microsoft.Resources/deployments",
44102-
"apiVersion": "2022-09-01",
44112+
"apiVersion": "2025-04-01",
4410344113
"name": "[take(format('avm.res.container-service.managed-cluster.aks-{0}', variables('solutionSuffix')), 64)]",
4410444114
"properties": {
4410544115
"expressionEvaluationOptions": {
@@ -47436,7 +47446,7 @@
4743647446
"applicationInsights": {
4743747447
"condition": "[parameters('enableMonitoring')]",
4743847448
"type": "Microsoft.Resources/deployments",
47439-
"apiVersion": "2022-09-01",
47449+
"apiVersion": "2025-04-01",
4744047450
"name": "[take(format('avm.res.insights.component.{0}', variables('applicationInsightsResourceName')), 64)]",
4744147451
"properties": {
4744247452
"expressionEvaluationOptions": {
@@ -48248,7 +48258,7 @@
4824848258
"metadata": {
4824948259
"description": "Contains Azure Search Service Name."
4825048260
},
48251-
"value": "[reference('avmSearchSearchServices').outputs.name.value]"
48261+
"value": "[variables('aiSearchName')]"
4825248262
},
4825348263
"AZURE_AKS_NAME": {
4825448264
"type": "string",
@@ -48290,7 +48300,7 @@
4829048300
"metadata": {
4829148301
"description": "Contains Azure Search Service Endpoint."
4829248302
},
48293-
"value": "[reference('avmSearchSearchServices').outputs.name.value]"
48303+
"value": "[variables('aiSearchName')]"
4829448304
},
4829548305
"AZ_GPT4O_MODEL_ID": {
4829648306
"type": "string",

0 commit comments

Comments
 (0)