|
5 | 5 | "metadata": {
|
6 | 6 | "_generator": {
|
7 | 7 | "name": "bicep",
|
8 |
| - "version": "0.34.44.8038", |
9 |
| - "templateHash": "7719893060553487435" |
| 8 | + "version": "0.35.1.17967", |
| 9 | + "templateHash": "6559422175999367984" |
10 | 10 | }
|
11 | 11 | },
|
12 | 12 | "parameters": {
|
|
48 | 48 | "description": "Location for all Ai services resources. This location can be different from the resource group location."
|
49 | 49 | }
|
50 | 50 | },
|
51 |
| - "prefix": { |
| 51 | + "environmentName": { |
52 | 52 | "type": "string",
|
53 |
| - "defaultValue": "macae", |
54 | 53 | "minLength": 3,
|
55 | 54 | "maxLength": 20,
|
56 | 55 | "metadata": {
|
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." |
| 56 | + "description": "A unique prefix for all resources in this deployment. This should be 3-20 characters long:" |
58 | 57 | }
|
59 | 58 | },
|
60 | 59 | "tags": {
|
|
107 | 106 | }
|
108 | 107 | },
|
109 | 108 | "variables": {
|
| 109 | + "uniqueId": "[toLower(uniqueString(subscription().id, parameters('environmentName'), resourceGroup().location))]", |
| 110 | + "solutionPrefix": "[format('ma{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]", |
110 | 111 | "modelVersion": "2024-08-06",
|
111 |
| - "aiServicesName": "[format('{0}-aiservices', parameters('prefix'))]", |
| 112 | + "aiServicesName": "[format('{0}-aiservices', variables('solutionPrefix'))]", |
112 | 113 | "deploymentType": "GlobalStandard",
|
113 | 114 | "gptModelVersion": "gpt-4o",
|
114 |
| - "appVersion": "fnd01", |
| 115 | + "appVersion": "latest", |
115 | 116 | "resgistryName": "biabcontainerreg",
|
116 | 117 | "dockerRegistryUrl": "[format('https://{0}.azurecr.io', variables('resgistryName'))]",
|
117 | 118 | "backendDockerImageURL": "[format('{0}.azurecr.io/macaebackend:{1}', variables('resgistryName'), variables('appVersion'))]",
|
118 | 119 | "frontendDockerImageURL": "[format('{0}.azurecr.io/macaefrontend:{1}', variables('resgistryName'), variables('appVersion'))]",
|
119 |
| - "uniqueNameFormat": "[format('{0}-{{0}}-{1}', parameters('prefix'), uniqueString(resourceGroup().id, parameters('prefix')))]", |
| 120 | + "uniqueNameFormat": "[format('{0}-{{0}}-{1}', variables('solutionPrefix'), uniqueString(resourceGroup().id, variables('solutionPrefix')))]", |
120 | 121 | "aoaiApiVersion": "2025-01-01-preview",
|
121 | 122 | "aiModelDeployments": [
|
122 | 123 | {
|
|
224 | 225 | "kind": "AIServices",
|
225 | 226 | "properties": {
|
226 | 227 | "customSubDomainName": "[variables('aiServicesName')]",
|
227 |
| - "apiProperties": {}, |
228 |
| - "disableLocalAuth": true |
| 228 | + "apiProperties": {} |
229 | 229 | }
|
230 | 230 | },
|
231 | 231 | "aiServicesDeployments": {
|
|
262 | 262 | "type": "Microsoft.Authorization/roleAssignments",
|
263 | 263 | "apiVersion": "2022-04-01",
|
264 | 264 | "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', variables('aiServicesName'))]",
|
265 |
| - "name": "[guid(resourceId('Microsoft.App/containerApps', format('{0}-backend', parameters('prefix'))), resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), resourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd'))]", |
| 265 | + "name": "[guid(resourceId('Microsoft.App/containerApps', format('{0}-backend', variables('solutionPrefix'))), resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), resourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd'))]", |
266 | 266 | "properties": {
|
267 | 267 | "principalId": "[reference('containerApp', '2024-03-01', 'full').identity.principalId]",
|
268 | 268 | "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd')]",
|
|
315 | 315 | "destination": "log-analytics",
|
316 | 316 | "logAnalyticsConfiguration": {
|
317 | 317 | "customerId": "[reference('logAnalytics').customerId]",
|
318 |
| - "sharedKey": "[listKeys(resourceId('Microsoft.OperationalInsights/workspaces', format(variables('uniqueNameFormat'), 'logs')), '2023-09-01').primarySharedKey]" |
| 318 | + "sharedKey": "[listKeys('logAnalytics', '2023-09-01').primarySharedKey]" |
319 | 319 | }
|
320 | 320 | }
|
321 | 321 | },
|
|
327 | 327 | "acaCosomsRoleAssignment": {
|
328 | 328 | "type": "Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments",
|
329 | 329 | "apiVersion": "2024-05-15",
|
330 |
| - "name": "[format('{0}/{1}', format(variables('uniqueNameFormat'), 'cosmos'), guid(resourceId('Microsoft.App/containerApps', format('{0}-backend', parameters('prefix'))), resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', format(variables('uniqueNameFormat'), 'cosmos'), '00000000-0000-0000-0000-000000000002')))]", |
| 330 | + "name": "[format('{0}/{1}', format(variables('uniqueNameFormat'), 'cosmos'), guid(resourceId('Microsoft.App/containerApps', format('{0}-backend', variables('solutionPrefix'))), resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', format(variables('uniqueNameFormat'), 'cosmos'), '00000000-0000-0000-0000-000000000002')))]", |
331 | 331 | "properties": {
|
332 | 332 | "principalId": "[reference('containerApp', '2024-03-01', 'full').identity.principalId]",
|
333 | 333 | "roleDefinitionId": "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', format(variables('uniqueNameFormat'), 'cosmos'), '00000000-0000-0000-0000-000000000002')]",
|
|
341 | 341 | "containerApp": {
|
342 | 342 | "type": "Microsoft.App/containerApps",
|
343 | 343 | "apiVersion": "2024-03-01",
|
344 |
| - "name": "[format('{0}-backend', parameters('prefix'))]", |
| 344 | + "name": "[format('{0}-backend', variables('solutionPrefix'))]", |
345 | 345 | "location": "[parameters('location')]",
|
346 | 346 | "tags": "[parameters('tags')]",
|
347 | 347 | "identity": {
|
|
532 | 532 | "existing": true,
|
533 | 533 | "type": "Microsoft.MachineLearningServices/workspaces",
|
534 | 534 | "apiVersion": "2024-01-01-preview",
|
535 |
| - "name": "[format('{0}-aiproject', parameters('prefix'))]" |
| 535 | + "name": "[format('{0}-aiproject', variables('solutionPrefix'))]" |
536 | 536 | },
|
537 | 537 | "aiDeveloper": {
|
538 | 538 | "existing": true,
|
|
543 | 543 | "aiDeveloperAccessProj": {
|
544 | 544 | "type": "Microsoft.Authorization/roleAssignments",
|
545 | 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'))]", |
| 546 | + "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', format('{0}-aiproject', variables('solutionPrefix')))]", |
| 547 | + "name": "[guid(format('{0}-backend', variables('solutionPrefix')), resourceId('Microsoft.MachineLearningServices/workspaces', format('{0}-aiproject', variables('solutionPrefix'))), resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee'))]", |
548 | 548 | "properties": {
|
549 | 549 | "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee')]",
|
550 | 550 | "principalId": "[reference('containerApp', '2024-03-01', 'full').identity.principalId]"
|
|
565 | 565 | "mode": "Incremental",
|
566 | 566 | "parameters": {
|
567 | 567 | "solutionName": {
|
568 |
| - "value": "[parameters('prefix')]" |
| 568 | + "value": "[variables('solutionPrefix')]" |
569 | 569 | },
|
570 | 570 | "solutionLocation": {
|
571 | 571 | "value": "[parameters('location')]"
|
|
580 | 580 | "metadata": {
|
581 | 581 | "_generator": {
|
582 | 582 | "name": "bicep",
|
583 |
| - "version": "0.34.44.8038", |
584 |
| - "templateHash": "10664495342911727649" |
| 583 | + "version": "0.35.1.17967", |
| 584 | + "templateHash": "5761607453167859573" |
585 | 585 | }
|
586 | 586 | },
|
587 | 587 | "parameters": {
|
|
685 | 685 | "mode": "Incremental",
|
686 | 686 | "parameters": {
|
687 | 687 | "solutionName": {
|
688 |
| - "value": "[parameters('prefix')]" |
| 688 | + "value": "[variables('solutionPrefix')]" |
689 | 689 | },
|
690 | 690 | "solutionLocation": {
|
691 | 691 | "value": "[parameters('azureOpenAILocation')]"
|
|
706 | 706 | "value": "[reference('aiServices').endpoint]"
|
707 | 707 | },
|
708 | 708 | "aiServicesKey": {
|
709 |
| - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]" |
| 709 | + "value": "[listKeys('aiServices', '2024-04-01-preview').key1]" |
710 | 710 | },
|
711 | 711 | "aiServicesId": {
|
712 | 712 | "value": "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
|
|
718 | 718 | "metadata": {
|
719 | 719 | "_generator": {
|
720 | 720 | "name": "bicep",
|
721 |
| - "version": "0.34.44.8038", |
722 |
| - "templateHash": "8087543237770345715" |
| 721 | + "version": "0.35.1.17967", |
| 722 | + "templateHash": "9490638595753234802" |
723 | 723 | }
|
724 | 724 | },
|
725 | 725 | "parameters": {
|
|
1094 | 1094 | "mode": "Incremental",
|
1095 | 1095 | "parameters": {
|
1096 | 1096 | "solutionName": {
|
1097 |
| - "value": "[parameters('prefix')]" |
| 1097 | + "value": "[variables('solutionPrefix')]" |
1098 | 1098 | },
|
1099 | 1099 | "managedIdentityId": {
|
1100 | 1100 | "value": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format(variables('uniqueNameFormat'), 'containerapp-pull'))]"
|
|
1112 | 1112 | "metadata": {
|
1113 | 1113 | "_generator": {
|
1114 | 1114 | "name": "bicep",
|
1115 |
| - "version": "0.34.44.8038", |
1116 |
| - "templateHash": "11364190519186458619" |
| 1115 | + "version": "0.35.1.17967", |
| 1116 | + "templateHash": "12327197428621494853" |
1117 | 1117 | }
|
1118 | 1118 | },
|
1119 | 1119 | "parameters": {
|
|
0 commit comments