|
6 | 6 | "_generator": { |
7 | 7 | "name": "bicep", |
8 | 8 | "version": "0.34.44.8038", |
9 | | - "templateHash": "2906892014954666053" |
| 9 | + "templateHash": "7719893060553487435" |
10 | 10 | } |
11 | 11 | }, |
12 | 12 | "parameters": { |
13 | 13 | "location": { |
14 | 14 | "type": "string", |
15 | | - "defaultValue": "EastUS2", |
16 | 15 | "metadata": { |
17 | 16 | "description": "Location for all resources." |
18 | 17 | } |
19 | 18 | }, |
20 | 19 | "azureOpenAILocation": { |
21 | 20 | "type": "string", |
22 | | - "defaultValue": "japaneast", |
| 21 | + "defaultValue": "eastus2", |
| 22 | + "allowedValues": [ |
| 23 | + "australiaeast", |
| 24 | + "brazilsouth", |
| 25 | + "canadacentral", |
| 26 | + "canadaeast", |
| 27 | + "eastus", |
| 28 | + "eastus2", |
| 29 | + "francecentral", |
| 30 | + "germanywestcentral", |
| 31 | + "japaneast", |
| 32 | + "koreacentral", |
| 33 | + "northcentralus", |
| 34 | + "norwayeast", |
| 35 | + "polandcentral", |
| 36 | + "southafricanorth", |
| 37 | + "southcentralus", |
| 38 | + "southindia", |
| 39 | + "swedencentral", |
| 40 | + "switzerlandnorth", |
| 41 | + "uaenorth", |
| 42 | + "uksouth", |
| 43 | + "westeurope", |
| 44 | + "westus", |
| 45 | + "westus3" |
| 46 | + ], |
23 | 47 | "metadata": { |
24 | | - "description": "Location for OpenAI resources." |
| 48 | + "description": "Location for all Ai services resources. This location can be different from the resource group location." |
25 | 49 | } |
26 | 50 | }, |
27 | 51 | "prefix": { |
28 | 52 | "type": "string", |
29 | | - "defaultValue": "macaeo", |
| 53 | + "defaultValue": "macae", |
| 54 | + "minLength": 3, |
| 55 | + "maxLength": 20, |
30 | 56 | "metadata": { |
31 | | - "description": "A prefix to add to the start of all resource names. Note: A \"unique\" suffix will also be added" |
| 57 | + "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." |
32 | 58 | } |
33 | 59 | }, |
34 | 60 | "tags": { |
|
77 | 103 | }, |
78 | 104 | "capacity": { |
79 | 105 | "type": "int", |
80 | | - "defaultValue": 1 |
| 106 | + "defaultValue": 140 |
81 | 107 | } |
82 | 108 | }, |
83 | 109 | "variables": { |
84 | 110 | "modelVersion": "2024-08-06", |
85 | 111 | "aiServicesName": "[format('{0}-aiservices', parameters('prefix'))]", |
86 | 112 | "deploymentType": "GlobalStandard", |
87 | 113 | "gptModelVersion": "gpt-4o", |
88 | | - "appVersion": "latest", |
| 114 | + "appVersion": "fnd01", |
89 | 115 | "resgistryName": "biabcontainerreg", |
90 | 116 | "dockerRegistryUrl": "[format('https://{0}.azurecr.io', variables('resgistryName'))]", |
91 | 117 | "backendDockerImageURL": "[format('{0}.azurecr.io/macaebackend:{1}', variables('resgistryName'), variables('appVersion'))]", |
92 | 118 | "frontendDockerImageURL": "[format('{0}.azurecr.io/macaefrontend:{1}', variables('resgistryName'), variables('appVersion'))]", |
93 | 119 | "uniqueNameFormat": "[format('{0}-{{0}}-{1}', parameters('prefix'), uniqueString(resourceGroup().id, parameters('prefix')))]", |
94 | | - "aoaiApiVersion": "2024-08-01-preview", |
| 120 | + "aoaiApiVersion": "2025-01-01-preview", |
95 | 121 | "aiModelDeployments": [ |
96 | 122 | { |
97 | 123 | "name": "[variables('gptModelVersion')]", |
|
198 | 224 | "kind": "AIServices", |
199 | 225 | "properties": { |
200 | 226 | "customSubDomainName": "[variables('aiServicesName')]", |
201 | | - "apiProperties": { |
202 | | - "statisticsEnabled": false |
203 | | - } |
| 227 | + "apiProperties": {}, |
| 228 | + "disableLocalAuth": true |
204 | 229 | } |
205 | 230 | }, |
206 | 231 | "aiServicesDeployments": { |
|
268 | 293 | { |
269 | 294 | "name": "EnableServerless" |
270 | 295 | } |
271 | | - ] |
| 296 | + ], |
| 297 | + "disableLocalAuth": true |
272 | 298 | } |
273 | 299 | }, |
274 | 300 | "pullIdentity": { |
|
377 | 403 | }, |
378 | 404 | { |
379 | 405 | "name": "AZURE_OPENAI_ENDPOINT", |
380 | | - "value": "[reference('aiServices').endpoint]" |
| 406 | + "value": "[replace(reference('aiServices').endpoint, 'cognitiveservices.azure.com', 'openai.azure.com')]" |
| 407 | + }, |
| 408 | + { |
| 409 | + "name": "AZURE_OPENAI_MODEL_NAME", |
| 410 | + "value": "[variables('gptModelVersion')]" |
381 | 411 | }, |
382 | 412 | { |
383 | 413 | "name": "AZURE_OPENAI_DEPLOYMENT_NAME", |
|
388 | 418 | "value": "[variables('aoaiApiVersion')]" |
389 | 419 | }, |
390 | 420 | { |
391 | | - "name": "FRONTEND_SITE_NAME", |
392 | | - "value": "[format('https://{0}.azurewebsites.net', format(variables('uniqueNameFormat'), 'frontend'))]" |
| 421 | + "name": "APPLICATIONINSIGHTS_INSTRUMENTATION_KEY", |
| 422 | + "value": "[reference('appInsights').InstrumentationKey]" |
393 | 423 | }, |
394 | 424 | { |
395 | 425 | "name": "APPLICATIONINSIGHTS_CONNECTION_STRING", |
396 | 426 | "value": "[reference('appInsights').ConnectionString]" |
| 427 | + }, |
| 428 | + { |
| 429 | + "name": "AZURE_AI_AGENT_PROJECT_CONNECTION_STRING", |
| 430 | + "value": "[reference('aifoundry').outputs.projectConnectionString.value]" |
| 431 | + }, |
| 432 | + { |
| 433 | + "name": "AZURE_AI_SUBSCRIPTION_ID", |
| 434 | + "value": "[subscription().subscriptionId]" |
| 435 | + }, |
| 436 | + { |
| 437 | + "name": "AZURE_AI_RESOURCE_GROUP", |
| 438 | + "value": "[resourceGroup().name]" |
| 439 | + }, |
| 440 | + { |
| 441 | + "name": "AZURE_AI_PROJECT_NAME", |
| 442 | + "value": "[reference('aifoundry').outputs.aiProjectName.value]" |
| 443 | + }, |
| 444 | + { |
| 445 | + "name": "FRONTEND_SITE_NAME", |
| 446 | + "value": "[format('https://{0}.azurewebsites.net', format(variables('uniqueNameFormat'), 'frontend'))]" |
397 | 447 | } |
398 | 448 | ] |
399 | 449 | } |
400 | 450 | ] |
401 | 451 | } |
402 | 452 | }, |
403 | 453 | "dependsOn": [ |
| 454 | + "aifoundry", |
404 | 455 | "aiServices", |
405 | 456 | "appInsights", |
406 | 457 | "containerAppEnv", |
|
457 | 508 | { |
458 | 509 | "name": "BACKEND_API_URL", |
459 | 510 | "value": "[format('https://{0}', reference('containerApp').configuration.ingress.fqdn)]" |
| 511 | + }, |
| 512 | + { |
| 513 | + "name": "AUTH_ENABLED", |
| 514 | + "value": "false" |
460 | 515 | } |
461 | 516 | ] |
462 | 517 | } |
|
473 | 528 | "pullIdentity" |
474 | 529 | ] |
475 | 530 | }, |
| 531 | + "aiHubProject": { |
| 532 | + "existing": true, |
| 533 | + "type": "Microsoft.MachineLearningServices/workspaces", |
| 534 | + "apiVersion": "2024-01-01-preview", |
| 535 | + "name": "[format('{0}-aiproject', parameters('prefix'))]" |
| 536 | + }, |
| 537 | + "aiDeveloper": { |
| 538 | + "existing": true, |
| 539 | + "type": "Microsoft.Authorization/roleDefinitions", |
| 540 | + "apiVersion": "2022-04-01", |
| 541 | + "name": "64702f94-c441-49e6-a78b-ef80e0188fee" |
| 542 | + }, |
| 543 | + "aiDeveloperAccessProj": { |
| 544 | + "type": "Microsoft.Authorization/roleAssignments", |
| 545 | + "apiVersion": "2022-04-01", |
| 546 | + "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', format('{0}-aiproject', parameters('prefix')))]", |
| 547 | + "name": "[guid(format('{0}-backend', parameters('prefix')), resourceId('Microsoft.MachineLearningServices/workspaces', format('{0}-aiproject', parameters('prefix'))), resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee'))]", |
| 548 | + "properties": { |
| 549 | + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee')]", |
| 550 | + "principalId": "[reference('containerApp', '2024-03-01', 'full').identity.principalId]" |
| 551 | + }, |
| 552 | + "dependsOn": [ |
| 553 | + "containerApp" |
| 554 | + ] |
| 555 | + }, |
476 | 556 | "kvault": { |
477 | 557 | "type": "Microsoft.Resources/deployments", |
478 | 558 | "apiVersion": "2022-09-01", |
|
639 | 719 | "_generator": { |
640 | 720 | "name": "bicep", |
641 | 721 | "version": "0.34.44.8038", |
642 | | - "templateHash": "12550713338937452696" |
| 722 | + "templateHash": "8087543237770345715" |
643 | 723 | } |
644 | 724 | }, |
645 | 725 | "parameters": { |
|
988 | 1068 | "storageAccountId": { |
989 | 1069 | "type": "string", |
990 | 1070 | "value": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageNameCleaned'))]" |
| 1071 | + }, |
| 1072 | + "projectConnectionString": { |
| 1073 | + "type": "string", |
| 1074 | + "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'))]" |
991 | 1075 | } |
992 | 1076 | } |
993 | 1077 | } |
|
0 commit comments