Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 2 additions & 0 deletions infra/deploy_ai_foundry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -492,3 +492,5 @@ output aiProjectName string = aiHubProject.name
output applicationInsightsId string = applicationInsights.id
output logAnalyticsWorkspaceResourceName string = logAnalytics.name
output storageAccountName string = storageNameCleaned
output applicationInsightsConnectionString string = applicationInsights.properties.ConnectionString

5 changes: 5 additions & 0 deletions infra/deploy_app_service.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ param streamTextSystemPrompt string
param aiProjectConnectionString string
param useAIProjectClientFlag string = 'false'
param aiProjectName string
param applicationInsightsConnectionString string

// var WebAppImageName = 'DOCKER|byoaiacontainer.azurecr.io/byoaia-app:latest'

Expand Down Expand Up @@ -215,6 +216,10 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: reference(applicationInsightsId, '2015-05-01').InstrumentationKey
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: applicationInsightsConnectionString
}
{
name: 'AZURE_SEARCH_SERVICE'
value: AzureSearchService
Expand Down
1 change: 1 addition & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ module appserviceModule 'deploy_app_service.bicep' = {
streamTextSystemPrompt: functionAppStreamTextSystemPrompt
aiProjectConnectionString:keyVault.getSecret('AZURE-AI-PROJECT-CONN-STRING')
aiProjectName:aifoundry.outputs.aiProjectName
applicationInsightsConnectionString:aifoundry.outputs.applicationInsightsConnectionString
}
scope: resourceGroup(resourceGroup().name)
}
Expand Down
39 changes: 25 additions & 14 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.34.44.8038",
"templateHash": "1797657337218629559"
"templateHash": "9713836480105967098"
}
},
"parameters": {
Expand Down Expand Up @@ -708,7 +708,7 @@
"_generator": {
"name": "bicep",
"version": "0.34.44.8038",
"templateHash": "3569608512312433081"
"templateHash": "18186919711353368589"
}
},
"parameters": {
Expand Down Expand Up @@ -1016,11 +1016,11 @@
"name": "[format('{0}/{1}', variables('aiHubName'), format('{0}-connection-AzureOpenAI', variables('aiHubName')))]",
"properties": {
"category": "AIServices",
"target": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').endpoint]",
"target": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').endpoint]",
"authType": "ApiKey",
"isSharedToAll": true,
"credentials": {
"key": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').key1]"
"key": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]"
},
"metadata": {
"ApiType": "Azure",
Expand Down Expand Up @@ -1122,7 +1122,7 @@
},
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2021-10-01",
"apiVersion": "2024-04-01-preview",
"name": "[variables('aiServicesName')]",
"location": "[variables('location')]",
"sku": {
Expand All @@ -1131,9 +1131,6 @@
"kind": "AIServices",
"properties": {
"customSubDomainName": "[variables('aiServicesName')]",
"apiProperties": {
"statisticsEnabled": false
},
"publicNetworkAccess": "Enabled"
}
},
Expand Down Expand Up @@ -1303,7 +1300,7 @@
"apiVersion": "2021-11-01-preview",
"name": "[format('{0}/{1}', parameters('keyVaultName'), 'AZURE-OPENAI-KEY')]",
"properties": {
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').key1]"
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
Expand All @@ -1330,7 +1327,7 @@
"apiVersion": "2021-11-01-preview",
"name": "[format('{0}/{1}', parameters('keyVaultName'), 'AZURE-OPENAI-ENDPOINT')]",
"properties": {
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').endpoint]"
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').endpoint]"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
Expand Down Expand Up @@ -1393,7 +1390,7 @@
"apiVersion": "2021-11-01-preview",
"name": "[format('{0}/{1}', parameters('keyVaultName'), 'COG-SERVICES-ENDPOINT')]",
"properties": {
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').endpoint]"
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').endpoint]"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
Expand All @@ -1404,7 +1401,7 @@
"apiVersion": "2021-11-01-preview",
"name": "[format('{0}/{1}', parameters('keyVaultName'), 'COG-SERVICES-KEY')]",
"properties": {
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').key1]"
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
Expand Down Expand Up @@ -1454,7 +1451,7 @@
},
"aiServicesTarget": {
"type": "string",
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2021-10-01').endpoint]"
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').endpoint]"
},
"aiServicesName": {
"type": "string",
Expand Down Expand Up @@ -1495,6 +1492,10 @@
"storageAccountName": {
"type": "string",
"value": "[variables('storageNameCleaned')]"
},
"applicationInsightsConnectionString": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Insights/components', variables('applicationInsightsName')), '2020-02-02').ConnectionString]"
}
}
}
Expand Down Expand Up @@ -2296,6 +2297,9 @@
},
"aiProjectName": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiProjectName.value]"
},
"applicationInsightsConnectionString": {
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.applicationInsightsConnectionString.value]"
}
},
"template": {
Expand All @@ -2305,7 +2309,7 @@
"_generator": {
"name": "bicep",
"version": "0.34.44.8038",
"templateHash": "8701343999231764795"
"templateHash": "15866728948176241669"
}
},
"parameters": {
Expand Down Expand Up @@ -2693,6 +2697,9 @@
},
"aiProjectName": {
"type": "string"
},
"applicationInsightsConnectionString": {
"type": "string"
}
},
"variables": {
Expand Down Expand Up @@ -2732,6 +2739,10 @@
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(parameters('applicationInsightsId'), '2015-05-01').InstrumentationKey]"
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[parameters('applicationInsightsConnectionString')]"
},
{
"name": "AZURE_SEARCH_SERVICE",
"value": "[parameters('AzureSearchService')]"
Expand Down
Loading
Loading