Skip to content

Commit 33e7afd

Browse files
Fix for deployment template validation error
1 parent cc65484 commit 33e7afd

File tree

3 files changed

+34
-50
lines changed

3 files changed

+34
-50
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ resource aiServices 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' =
182182
kind: 'AIServices'
183183
properties: {
184184
customSubDomainName: aiServicesName
185-
// apiProperties: {
186-
// statisticsEnabled: false
187-
// }
188185
}
189186
}
190187

@@ -211,9 +208,6 @@ resource aiServices_CU 'Microsoft.CognitiveServices/accounts@2024-04-01-preview'
211208
kind: 'AIServices'
212209
properties: {
213210
customSubDomainName: aiServicesName_cu
214-
// apiProperties: {
215-
// statisticsEnabled: false
216-
// }
217211
}
218212
}
219213

@@ -697,14 +691,12 @@ output aiSearchId string = aiSearch.id
697691
output aiSearchTarget string = 'https://${aiSearch.name}.search.windows.net'
698692
output aiSearchService string = aiSearch.name
699693
output aiProjectName string = aiHubProject.name
700-
output aiSearchKey string = aiSearch.listAdminKeys().primaryKey
701694

702695
output applicationInsightsId string = applicationInsights.id
703696
output logAnalyticsWorkspaceResourceName string = logAnalytics.name
704697
output storageAccountName string = storageNameCleaned
705698

706699
output azureOpenAIKeyName string = azureOpenAIApiKeyEntry.name
707-
output azureOpenAIKey string = aiServices.listKeys().key1
708700

709701
output azureProjectConnString string = '${split(aiHubProject.properties.discoveryUrl, '/')[2]};${subscription().subscriptionId};${resourceGroup().name};${aiHubProject.name}'
710702
output azureProjectName string = aiHubProject.name

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ output AZURE_SECONDARY_LOCATION string = secondaryLocation
248248
output APPINSIGHTS_INSTRUMENTATIONKEY string = backend_docker.outputs.appInsightInstrumentationKey
249249
output AZURE_AI_PROJECT_CONN_STRING string = aifoundry.outputs.azureProjectConnString
250250
output AZURE_AI_PROJECT_NAME string = aifoundry.outputs.azureProjectName
251-
output AZURE_AI_SEARCH_API_KEY string = aifoundry.outputs.aiSearchKey
251+
output AZURE_AI_SEARCH_API_KEY string = ''
252252
output AZURE_AI_SEARCH_ENDPOINT string = aifoundry.outputs.aiSearchTarget
253253
output AZURE_AI_SEARCH_INDEX string = 'call_transcripts_index'
254254
output AZURE_COSMOSDB_ACCOUNT string = cosmosDBModule.outputs.cosmosAccountName
@@ -258,7 +258,7 @@ output AZURE_COSMOSDB_ENABLE_FEEDBACK string = 'True'
258258
output AZURE_OPEN_AI_DEPLOYMENT_MODEL string = gptModelName
259259
output AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY int = gptDeploymentCapacity
260260
output AZURE_OPEN_AI_ENDPOINT string = aifoundry.outputs.aiServicesTarget
261-
output AZURE_OPENAI_API_KEY string = aifoundry.outputs.azureOpenAIKey
261+
output AZURE_OPENAI_API_KEY string = ''
262262
output AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE string = deploymentType
263263
output AZURE_OPENAI_EMBEDDING_MODEL string = embeddingModel
264264
output AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY int = embeddingDeploymentCapacity

infra/main.json

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"metadata": {
55
"_generator": {
66
"name": "bicep",
7-
"version": "0.33.93.31351",
8-
"templateHash": "5113162408307967552"
7+
"version": "0.35.1.17967",
8+
"templateHash": "531222519582602266"
99
}
1010
},
1111
"parameters": {
@@ -128,8 +128,8 @@
128128
"metadata": {
129129
"_generator": {
130130
"name": "bicep",
131-
"version": "0.33.93.31351",
132-
"templateHash": "11920656242524003012"
131+
"version": "0.35.1.17967",
132+
"templateHash": "3577716481523254546"
133133
}
134134
},
135135
"parameters": {
@@ -240,8 +240,8 @@
240240
"metadata": {
241241
"_generator": {
242242
"name": "bicep",
243-
"version": "0.33.93.31351",
244-
"templateHash": "13908043870536599124"
243+
"version": "0.35.1.17967",
244+
"templateHash": "4322902206161965243"
245245
}
246246
},
247247
"parameters": {
@@ -387,8 +387,8 @@
387387
"metadata": {
388388
"_generator": {
389389
"name": "bicep",
390-
"version": "0.33.93.31351",
391-
"templateHash": "17524263299629104759"
390+
"version": "0.35.1.17967",
391+
"templateHash": "8627123677898681051"
392392
}
393393
},
394394
"parameters": {
@@ -1022,10 +1022,6 @@
10221022
"type": "string",
10231023
"value": "[variables('aiProjectName')]"
10241024
},
1025-
"aiSearchKey": {
1026-
"type": "string",
1027-
"value": "[listAdminKeys(resourceId('Microsoft.Search/searchServices', variables('aiSearchName')), '2023-11-01').primaryKey]"
1028-
},
10291025
"applicationInsightsId": {
10301026
"type": "string",
10311027
"value": "[resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]"
@@ -1042,10 +1038,6 @@
10421038
"type": "string",
10431039
"value": "AZURE-OPENAI-KEY"
10441040
},
1045-
"azureOpenAIKey": {
1046-
"type": "string",
1047-
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]"
1048-
},
10491041
"azureProjectConnString": {
10501042
"type": "string",
10511043
"value": "[format('{0};{1};{2};{3}', split(reference(resourceId('Microsoft.MachineLearningServices/workspaces', variables('aiProjectName')), '2024-01-01-preview').discoveryUrl, '/')[2], subscription().subscriptionId, resourceGroup().name, variables('aiProjectName'))]"
@@ -1092,8 +1084,8 @@
10921084
"metadata": {
10931085
"_generator": {
10941086
"name": "bicep",
1095-
"version": "0.33.93.31351",
1096-
"templateHash": "14620142974675285735"
1087+
"version": "0.35.1.17967",
1088+
"templateHash": "15989391424807539709"
10971089
}
10981090
},
10991091
"parameters": {
@@ -1276,8 +1268,8 @@
12761268
"metadata": {
12771269
"_generator": {
12781270
"name": "bicep",
1279-
"version": "0.33.93.31351",
1280-
"templateHash": "12347068855899407617"
1271+
"version": "0.35.1.17967",
1272+
"templateHash": "13542293930946641523"
12811273
}
12821274
},
12831275
"parameters": {
@@ -1488,8 +1480,8 @@
14881480
"metadata": {
14891481
"_generator": {
14901482
"name": "bicep",
1491-
"version": "0.33.93.31351",
1492-
"templateHash": "16605082293199555822"
1483+
"version": "0.35.1.17967",
1484+
"templateHash": "16772146797302961765"
14931485
}
14941486
},
14951487
"parameters": {
@@ -1704,8 +1696,8 @@
17041696
"metadata": {
17051697
"_generator": {
17061698
"name": "bicep",
1707-
"version": "0.33.93.31351",
1708-
"templateHash": "16243838204790550721"
1699+
"version": "0.35.1.17967",
1700+
"templateHash": "5501823863095481452"
17091701
}
17101702
},
17111703
"parameters": {
@@ -1884,8 +1876,8 @@
18841876
"metadata": {
18851877
"_generator": {
18861878
"name": "bicep",
1887-
"version": "0.33.93.31351",
1888-
"templateHash": "3990461296238110870"
1879+
"version": "0.35.1.17967",
1880+
"templateHash": "3388883066287739760"
18891881
},
18901882
"description": "Creates an Azure App Service plan."
18911883
},
@@ -2033,8 +2025,8 @@
20332025
"metadata": {
20342026
"_generator": {
20352027
"name": "bicep",
2036-
"version": "0.33.93.31351",
2037-
"templateHash": "1048230098337804947"
2028+
"version": "0.35.1.17967",
2029+
"templateHash": "13726599232772586761"
20382030
}
20392031
},
20402032
"parameters": {
@@ -2134,8 +2126,8 @@
21342126
"metadata": {
21352127
"_generator": {
21362128
"name": "bicep",
2137-
"version": "0.33.93.31351",
2138-
"templateHash": "16308543969241672542"
2129+
"version": "0.35.1.17967",
2130+
"templateHash": "5594723048561919975"
21392131
}
21402132
},
21412133
"parameters": {
@@ -2250,8 +2242,8 @@
22502242
"metadata": {
22512243
"_generator": {
22522244
"name": "bicep",
2253-
"version": "0.33.93.31351",
2254-
"templateHash": "5462989833378560251"
2245+
"version": "0.35.1.17967",
2246+
"templateHash": "12543749504493145946"
22552247
},
22562248
"description": "Updates app settings for an Azure App Service."
22572249
},
@@ -2357,8 +2349,8 @@
23572349
"metadata": {
23582350
"_generator": {
23592351
"name": "bicep",
2360-
"version": "0.33.93.31351",
2361-
"templateHash": "10943987651087843369"
2352+
"version": "0.35.1.17967",
2353+
"templateHash": "14942529326450944423"
23622354
}
23632355
},
23642356
"parameters": {
@@ -2413,8 +2405,8 @@
24132405
"metadata": {
24142406
"_generator": {
24152407
"name": "bicep",
2416-
"version": "0.33.93.31351",
2417-
"templateHash": "16308543969241672542"
2408+
"version": "0.35.1.17967",
2409+
"templateHash": "5594723048561919975"
24182410
}
24192411
},
24202412
"parameters": {
@@ -2529,8 +2521,8 @@
25292521
"metadata": {
25302522
"_generator": {
25312523
"name": "bicep",
2532-
"version": "0.33.93.31351",
2533-
"templateHash": "5462989833378560251"
2524+
"version": "0.35.1.17967",
2525+
"templateHash": "12543749504493145946"
25342526
},
25352527
"description": "Updates app settings for an Azure App Service."
25362528
},
@@ -2631,7 +2623,7 @@
26312623
},
26322624
"AZURE_AI_SEARCH_API_KEY": {
26332625
"type": "string",
2634-
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiSearchKey.value]"
2626+
"value": ""
26352627
},
26362628
"AZURE_AI_SEARCH_ENDPOINT": {
26372629
"type": "string",
@@ -2671,7 +2663,7 @@
26712663
},
26722664
"AZURE_OPENAI_API_KEY": {
26732665
"type": "string",
2674-
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.azureOpenAIKey.value]"
2666+
"value": ""
26752667
},
26762668
"AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE": {
26772669
"type": "string",

0 commit comments

Comments
 (0)