Skip to content

Commit fb873c8

Browse files
committed
Added new env vars comment out new continer until its published
1 parent a96e2b8 commit fb873c8

File tree

3 files changed

+57
-11
lines changed

3 files changed

+57
-11
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,5 @@ output storageAccountName string = storageNameCleaned
298298

299299
output logAnalyticsId string = logAnalytics.id
300300
output storageAccountId string = storage.id
301+
302+
output projectConnectionString string = '${split(aiHubProject.properties.discoveryUrl, '/')[2]};${subscription().subscriptionId};${resourceGroup().name};${aiHubProject.name}'

infra/main.bicep

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@minLength(3)
22
@maxLength(10)
33
@description('Prefix for all resources created by this template. This prefix will be used to create unique names for all resources. The prefix must be unique within the resource group.')
4-
param ResourcePrefix string
4+
param ResourcePrefix string
55

66
@allowed([
77
'australiaeast'
@@ -29,7 +29,7 @@ param ResourcePrefix string
2929
'westus3'
3030
])
3131
@description('Location for all Ai services resources. This location can be different from the resource group location.')
32-
param AiLocation string // The location used for all deployed resources. This location must be in the same region as the resource group.
32+
param AiLocation string // The location used for all deployed resources. This location must be in the same region as the resource group.
3333
param capacity int = 5
3434

3535

@@ -46,7 +46,7 @@ var randomString = substring(uniqueString(resourceGroup().id), 0, 4)
4646
// Combine the base name with the random suffix
4747
var finalName = '${ResourcePrefix}-${randomString}'
4848

49-
var imageVersion = 'rc1'
49+
var imageVersion = 'rc1' //Change to "Fnd01" when new container is available
5050
var location = resourceGroup().location
5151
var dblocation = resourceGroup().location
5252
var cosmosdbDatabase = 'cmsadb'
@@ -352,6 +352,26 @@ resource containerAppBackend 'Microsoft.App/containerApps@2023-05-01' = {
352352
name: 'TERMINATION_MODEL_DEPLOY'
353353
value: llmModel
354354
}
355+
{
356+
name: 'AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME'
357+
value: llmModel
358+
}
359+
{
360+
name: 'AZURE_AI_AGENT_PROJECT_NAME'
361+
value: aifoundry.outputs.aiProjectName
362+
}
363+
{
364+
name: 'AZURE_AI_AGENT_RESOURCE_GROUP_NAME'
365+
value: resourceGroup().name
366+
}
367+
{
368+
name: 'AZURE_AI_AGENT_SUBSCRIPTION_ID'
369+
value: subscription().subscriptionId
370+
}
371+
{
372+
name: 'AZURE_AI_AGENT_PROJECT_CONNECTION_STRING'
373+
value: aifoundry.outputs.projectConnectionString
374+
}
355375
]
356376
resources: {
357377
cpu: 1

infra/main.json

Lines changed: 32 additions & 8 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": "11802129812634129151"
7+
"version": "0.34.44.8038",
8+
"templateHash": "8953208502938265930"
99
}
1010
},
1111
"parameters": {
@@ -216,6 +216,26 @@
216216
{
217217
"name": "TERMINATION_MODEL_DEPLOY",
218218
"value": "[variables('llmModel')]"
219+
},
220+
{
221+
"name": "AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME",
222+
"value": "[variables('llmModel')]"
223+
},
224+
{
225+
"name": "AZURE_AI_AGENT_PROJECT_NAME",
226+
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiProjectName.value]"
227+
},
228+
{
229+
"name": "AZURE_AI_AGENT_RESOURCE_GROUP_NAME",
230+
"value": "[resourceGroup().name]"
231+
},
232+
{
233+
"name": "AZURE_AI_AGENT_SUBSCRIPTION_ID",
234+
"value": "[subscription().subscriptionId]"
235+
},
236+
{
237+
"name": "AZURE_AI_AGENT_PROJECT_CONNECTION_STRING",
238+
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.projectConnectionString.value]"
219239
}
220240
],
221241
"resources": {
@@ -353,8 +373,8 @@
353373
"metadata": {
354374
"_generator": {
355375
"name": "bicep",
356-
"version": "0.33.93.31351",
357-
"templateHash": "11665286146084422127"
376+
"version": "0.34.44.8038",
377+
"templateHash": "17863870312619064541"
358378
}
359379
},
360380
"parameters": {
@@ -451,8 +471,8 @@
451471
"metadata": {
452472
"_generator": {
453473
"name": "bicep",
454-
"version": "0.33.93.31351",
455-
"templateHash": "4388214478635448075"
474+
"version": "0.34.44.8038",
475+
"templateHash": "10664495342911727649"
456476
}
457477
},
458478
"parameters": {
@@ -589,8 +609,8 @@
589609
"metadata": {
590610
"_generator": {
591611
"name": "bicep",
592-
"version": "0.33.93.31351",
593-
"templateHash": "10270252950808398257"
612+
"version": "0.34.44.8038",
613+
"templateHash": "8087543237770345715"
594614
}
595615
},
596616
"parameters": {
@@ -939,6 +959,10 @@
939959
"storageAccountId": {
940960
"type": "string",
941961
"value": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageNameCleaned'))]"
962+
},
963+
"projectConnectionString": {
964+
"type": "string",
965+
"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'))]"
942966
}
943967
}
944968
}

0 commit comments

Comments
 (0)