|
5 | 5 | "_generator": { |
6 | 6 | "name": "bicep", |
7 | 7 | "version": "0.34.44.8038", |
8 | | - "templateHash": "13937422806437579370" |
| 8 | + "templateHash": "372840055428460103" |
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "parameters": { |
|
17 | 17 | "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." |
18 | 18 | } |
19 | 19 | }, |
20 | | - "AiLocation": { |
| 20 | + "AzureAiServiceLocation": { |
21 | 21 | "type": "string", |
22 | 22 | "allowedValues": [ |
23 | 23 | "australiaeast", |
|
55 | 55 | }, |
56 | 56 | "variables": { |
57 | 57 | "uniqueId": "[toLower(uniqueString(subscription().id, parameters('Prefix'), resourceGroup().location))]", |
58 | | - "ResourcePrefix": "[format('cm{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]", |
| 58 | + "UniquePrefix": "[format('cm{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]", |
| 59 | + "ResourcePrefix": "[take(format('cm{0}{1}', parameters('Prefix'), variables('UniquePrefix')), 15)]", |
59 | 60 | "imageVersion": "rc1", |
60 | 61 | "location": "[resourceGroup().location]", |
61 | 62 | "dblocation": "[resourceGroup().location]", |
|
67 | 68 | "containerName": "appstorage", |
68 | 69 | "llmModel": "gpt-4o", |
69 | 70 | "storageSkuName": "Standard_LRS", |
70 | | - "storageContainerName": "[format('{0}ctstor', variables('ResourcePrefix'))]", |
| 71 | + "storageContainerName": "[format('{0}cts', variables('ResourcePrefix'))]", |
71 | 72 | "gptModelVersion": "2024-08-06", |
72 | | - "aiServicesName": "[format('{0}-aiservices', variables('ResourcePrefix'))]", |
| 73 | + "azureAiServicesName": "[format('{0}-ais', variables('ResourcePrefix'))]", |
73 | 74 | "aiModelDeployments": [ |
74 | 75 | { |
75 | 76 | "name": "[variables('llmModel')]", |
|
91 | 92 | { |
92 | 93 | "type": "Microsoft.CognitiveServices/accounts", |
93 | 94 | "apiVersion": "2024-04-01-preview", |
94 | | - "name": "[variables('aiServicesName')]", |
| 95 | + "name": "[variables('azureAiServicesName')]", |
95 | 96 | "location": "[variables('location')]", |
96 | 97 | "sku": { |
97 | 98 | "name": "S0" |
98 | 99 | }, |
99 | 100 | "kind": "AIServices", |
100 | 101 | "properties": { |
101 | | - "customSubDomainName": "[variables('aiServicesName')]", |
| 102 | + "customSubDomainName": "[variables('azureAiServicesName')]", |
102 | 103 | "apiProperties": { |
103 | 104 | "statisticsEnabled": false |
104 | 105 | } |
105 | 106 | } |
106 | 107 | }, |
107 | 108 | { |
108 | 109 | "copy": { |
109 | | - "name": "aiServicesDeployments", |
| 110 | + "name": "azureAiServicesDeployments", |
110 | 111 | "count": "[length(variables('aiModelDeployments'))]", |
111 | 112 | "mode": "serial", |
112 | 113 | "batchSize": 1 |
113 | 114 | }, |
114 | 115 | "type": "Microsoft.CognitiveServices/accounts/deployments", |
115 | 116 | "apiVersion": "2023-05-01", |
116 | | - "name": "[format('{0}/{1}', variables('aiServicesName'), variables('aiModelDeployments')[copyIndex()].name)]", |
| 117 | + "name": "[format('{0}/{1}', variables('azureAiServicesName'), variables('aiModelDeployments')[copyIndex()].name)]", |
117 | 118 | "properties": { |
118 | 119 | "model": { |
119 | 120 | "format": "OpenAI", |
|
127 | 128 | "capacity": "[variables('aiModelDeployments')[copyIndex()].sku.capacity]" |
128 | 129 | }, |
129 | 130 | "dependsOn": [ |
130 | | - "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]" |
| 131 | + "[resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName'))]" |
131 | 132 | ] |
132 | 133 | }, |
133 | 134 | { |
|
302 | 303 | { |
303 | 304 | "type": "Microsoft.Authorization/roleAssignments", |
304 | 305 | "apiVersion": "2022-04-01", |
305 | | - "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', variables('aiServicesName'))]", |
| 306 | + "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', variables('azureAiServicesName'))]", |
306 | 307 | "name": "[guid(resourceId('Microsoft.App/containerApps', toLower(format('{0}Backend', variables('ResourcePrefix')))), variables('openAiContributorRoleId'))]", |
307 | 308 | "properties": { |
308 | 309 | "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', variables('openAiContributorRoleId'))]", |
309 | 310 | "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}Backend', variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" |
310 | 311 | }, |
311 | 312 | "dependsOn": [ |
312 | | - "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]", |
| 313 | + "[resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName'))]", |
313 | 314 | "[resourceId('Microsoft.App/containerApps', toLower(format('{0}Backend', variables('ResourcePrefix'))))]" |
314 | 315 | ] |
315 | 316 | }, |
|
353 | 354 | "_generator": { |
354 | 355 | "name": "bicep", |
355 | 356 | "version": "0.34.44.8038", |
356 | | - "templateHash": "17863870312619064541" |
| 357 | + "templateHash": "15524749849693178338" |
357 | 358 | } |
358 | 359 | }, |
359 | 360 | "parameters": { |
|
373 | 374 | }, |
374 | 375 | "miName": { |
375 | 376 | "type": "string", |
376 | | - "defaultValue": "[format('{0}-managed-identity', parameters('solutionName'))]", |
| 377 | + "defaultValue": "[format('{0}-mng-id', parameters('solutionName'))]", |
377 | 378 | "metadata": { |
378 | 379 | "description": "Name" |
379 | 380 | } |
|
558 | 559 | "value": "[variables('ResourcePrefix')]" |
559 | 560 | }, |
560 | 561 | "solutionLocation": { |
561 | | - "value": "[parameters('AiLocation')]" |
| 562 | + "value": "[parameters('AzureAiServiceLocation')]" |
562 | 563 | }, |
563 | 564 | "keyVaultName": { |
564 | 565 | "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault'), '2022-09-01').outputs.keyvaultName.value]" |
|
573 | 574 | "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity'), '2022-09-01').outputs.managedIdentityOutput.value.objectId]" |
574 | 575 | }, |
575 | 576 | "aiServicesEndpoint": { |
576 | | - "value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').endpoint]" |
| 577 | + "value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName')), '2024-04-01-preview').endpoint]" |
577 | 578 | }, |
578 | 579 | "aiServicesKey": { |
579 | | - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]" |
| 580 | + "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName')), '2024-04-01-preview').key1]" |
580 | 581 | }, |
581 | 582 | "aiServicesId": { |
582 | | - "value": "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]" |
| 583 | + "value": "[resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName'))]" |
583 | 584 | } |
584 | 585 | }, |
585 | 586 | "template": { |
|
589 | 590 | "_generator": { |
590 | 591 | "name": "bicep", |
591 | 592 | "version": "0.34.44.8038", |
592 | | - "templateHash": "12550713338937452696" |
| 593 | + "templateHash": "1990190368109519471" |
593 | 594 | } |
594 | 595 | }, |
595 | 596 | "parameters": { |
|
622 | 623 | } |
623 | 624 | }, |
624 | 625 | "variables": { |
625 | | - "storageName": "[format('{0}hubstorage', parameters('solutionName'))]", |
| 626 | + "storageName": "[format('{0}hubstr', parameters('solutionName'))]", |
626 | 627 | "storageSkuName": "Standard_LRS", |
627 | | - "aiServicesName": "[format('{0}-aiservices', parameters('solutionName'))]", |
628 | | - "workspaceName": "[format('{0}-workspace', parameters('solutionName'))]", |
| 628 | + "aiServicesName": "[format('{0}-ais', parameters('solutionName'))]", |
| 629 | + "workspaceName": "[format('{0}-wrksp', parameters('solutionName'))]", |
629 | 630 | "keyvaultName": "[format('{0}-kv', parameters('solutionName'))]", |
630 | 631 | "location": "[parameters('solutionLocation')]", |
631 | 632 | "aiHubName": "[format('{0}-aihub', parameters('solutionName'))]", |
632 | 633 | "aiHubFriendlyName": "[variables('aiHubName')]", |
633 | 634 | "aiHubDescription": "AI Hub for KM template", |
634 | | - "aiProjectName": "[format('{0}-aiproject', parameters('solutionName'))]", |
| 635 | + "aiProjectName": "[format('{0}-aiprj', parameters('solutionName'))]", |
635 | 636 | "aiProjectFriendlyName": "[variables('aiProjectName')]", |
636 | | - "aiSearchName": "[format('{0}-search', parameters('solutionName'))]", |
| 637 | + "aiSearchName": "[format('{0}-srch', parameters('solutionName'))]", |
637 | 638 | "storageNameCleaned": "[replace(variables('storageName'), '-', '')]" |
638 | 639 | }, |
639 | 640 | "resources": [ |
|
943 | 944 | } |
944 | 945 | }, |
945 | 946 | "dependsOn": [ |
946 | | - "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]", |
| 947 | + "[resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName'))]", |
947 | 948 | "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault')]", |
948 | 949 | "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]" |
949 | 950 | ] |
|
0 commit comments