|
5 | 5 | "_generator": {
|
6 | 6 | "name": "bicep",
|
7 | 7 | "version": "0.35.1.17967",
|
8 |
| - "templateHash": "12546479610758564230" |
| 8 | + "templateHash": "18182441225742462111" |
9 | 9 | }
|
10 | 10 | },
|
11 | 11 | "parameters": {
|
12 | 12 | "Prefix": {
|
13 | 13 | "type": "string",
|
14 | 14 | "minLength": 3,
|
15 |
| - "maxLength": 20, |
16 | 15 | "metadata": {
|
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." |
| 16 | + "description": "Prefix for all resources created by this template. This should be 3-20 characters long. If your provide a prefix longer than 20 characters, it will be truncated to 20 characters." |
18 | 17 | }
|
19 | 18 | },
|
20 | 19 | "AzureAiServiceLocation": {
|
|
54 | 53 | }
|
55 | 54 | },
|
56 | 55 | "variables": {
|
57 |
| - "uniqueId": "[toLower(uniqueString(subscription().id, parameters('Prefix'), resourceGroup().location))]", |
| 56 | + "safePrefix": "[if(greater(length(parameters('Prefix')), 20), substring(parameters('Prefix'), 0, 20), parameters('Prefix'))]", |
| 57 | + "uniqueId": "[toLower(uniqueString(subscription().id, variables('safePrefix'), resourceGroup().location))]", |
58 | 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 | + "ResourcePrefix": "[take(format('cm{0}{1}', variables('safePrefix'), variables('UniquePrefix')), 15)]", |
60 | 60 | "imageVersion": "latest",
|
61 | 61 | "location": "[resourceGroup().location]",
|
62 | 62 | "dblocation": "[resourceGroup().location]",
|
|
68 | 68 | "containerName": "appstorage",
|
69 | 69 | "llmModel": "gpt-4o",
|
70 | 70 | "storageSkuName": "Standard_LRS",
|
71 |
| - "storageContainerName": "[format('{0}cast', variables('ResourcePrefix'))]", |
| 71 | + "storageContainerName": "[replace(replace(replace(replace(format('{0}cast', variables('ResourcePrefix')), '-', ''), '_', ''), '.', ''), '/', '')]", |
72 | 72 | "gptModelVersion": "2024-08-06",
|
73 | 73 | "azureAiServicesName": "[format('{0}-ais', variables('ResourcePrefix'))]",
|
74 | 74 | "aiModelDeployments": [
|
|
618 | 618 | "_generator": {
|
619 | 619 | "name": "bicep",
|
620 | 620 | "version": "0.35.1.17967",
|
621 |
| - "templateHash": "4382273497899479323" |
| 621 | + "templateHash": "8013960718059965025" |
622 | 622 | }
|
623 | 623 | },
|
624 | 624 | "parameters": {
|
625 | 625 | "solutionName": {
|
626 |
| - "type": "string" |
| 626 | + "type": "string", |
| 627 | + "minLength": 3, |
| 628 | + "maxLength": 15, |
| 629 | + "metadata": { |
| 630 | + "description": "Solution Name" |
| 631 | + } |
627 | 632 | },
|
628 | 633 | "solutionLocation": {
|
629 | 634 | "type": "string"
|
|
648 | 653 | },
|
649 | 654 | "aiServicesId": {
|
650 | 655 | "type": "string"
|
| 656 | + }, |
| 657 | + "storageName": { |
| 658 | + "type": "string", |
| 659 | + "defaultValue": "[format('{0}hubst', parameters('solutionName'))]" |
651 | 660 | }
|
652 | 661 | },
|
653 | 662 | "variables": {
|
654 |
| - "storageName": "[format('{0}hubst', parameters('solutionName'))]", |
655 | 663 | "storageSkuName": "Standard_LRS",
|
656 | 664 | "aiServicesName": "[format('{0}-ais', parameters('solutionName'))]",
|
657 | 665 | "workspaceName": "[format('{0}-log', parameters('solutionName'))]",
|
|
663 | 671 | "aiProjectName": "[format('{0}-prj', parameters('solutionName'))]",
|
664 | 672 | "aiProjectFriendlyName": "[variables('aiProjectName')]",
|
665 | 673 | "aiSearchName": "[format('{0}-srch', parameters('solutionName'))]",
|
666 |
| - "storageNameCleaned": "[replace(variables('storageName'), '-', '')]" |
| 674 | + "storageNameCleaned": "[replace(replace(replace(replace(format('{0}cast', parameters('storageName')), '-', ''), '_', ''), '.', ''), '/', '')]" |
667 | 675 | },
|
668 | 676 | "resources": [
|
669 | 677 | {
|
|
0 commit comments