|
16 | 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." |
17 | 17 | } |
18 | 18 | }, |
| 19 | + "solutionLocation": { |
| 20 | + "type": "string", |
| 21 | + "defaultValue": "[resourceGroup().location]", |
| 22 | + "metadata": { |
| 23 | + "description": "Required. Location for all Resources except AI Foundry." |
| 24 | + } |
| 25 | + }, |
19 | 26 | "AzureAiServiceLocation": { |
20 | 27 | "type": "string", |
21 | 28 | "allowedValues": [ |
22 | 29 | "australiaeast", |
23 | | - "brazilsouth", |
24 | | - "canadacentral", |
25 | | - "canadaeast", |
26 | 30 | "eastus", |
27 | 31 | "eastus2", |
28 | 32 | "francecentral", |
29 | | - "germanywestcentral", |
30 | 33 | "japaneast", |
31 | | - "koreacentral", |
32 | | - "northcentralus", |
33 | 34 | "norwayeast", |
34 | | - "polandcentral", |
35 | | - "southafricanorth", |
36 | | - "southcentralus", |
37 | 35 | "southindia", |
38 | 36 | "swedencentral", |
39 | | - "switzerlandnorth", |
40 | | - "uaenorth", |
41 | 37 | "uksouth", |
42 | | - "westeurope", |
43 | 38 | "westus", |
44 | 39 | "westus3" |
45 | 40 | ], |
|
49 | 44 | }, |
50 | 45 | "capacity": { |
51 | 46 | "type": "int", |
52 | | - "defaultValue": 5 |
| 47 | + "defaultValue": 5, |
| 48 | + "minValue": 5, |
| 49 | + "metadata": { |
| 50 | + "description": "Capacity of the GPT deployment:" |
| 51 | + } |
| 52 | + }, |
| 53 | + "deploymentType": { |
| 54 | + "type": "string", |
| 55 | + "defaultValue": "GlobalStandard", |
| 56 | + "minLength": 1, |
| 57 | + "metadata": { |
| 58 | + "description": "GPT model deployment type:" |
| 59 | + } |
| 60 | + }, |
| 61 | + "llmModel": { |
| 62 | + "type": "string", |
| 63 | + "defaultValue": "gpt-4o", |
| 64 | + "minLength": 1, |
| 65 | + "metadata": { |
| 66 | + "description": "Name of the GPT model to deploy:" |
| 67 | + } |
| 68 | + }, |
| 69 | + "imageVersion": { |
| 70 | + "type": "string", |
| 71 | + "defaultValue": "latest", |
| 72 | + "minLength": 1, |
| 73 | + "metadata": { |
| 74 | + "description": "Set the Image tag:" |
| 75 | + } |
| 76 | + }, |
| 77 | + "gptModelVersion": { |
| 78 | + "type": "string", |
| 79 | + "defaultValue": "2024-08-06", |
| 80 | + "minLength": 1, |
| 81 | + "metadata": { |
| 82 | + "description": "Version of the GPT model to deploy:" |
| 83 | + } |
53 | 84 | } |
54 | 85 | }, |
55 | 86 | "variables": { |
|
285 | 316 | "uniqueId": "[toLower(uniqueString(subscription().id, variables('safePrefix'), resourceGroup().location))]", |
286 | 317 | "UniquePrefix": "[format('cm{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]", |
287 | 318 | "ResourcePrefix": "[take(format('cm{0}{1}', variables('safePrefix'), variables('UniquePrefix')), 15)]", |
288 | | - "imageVersion": "latest", |
289 | | - "location": "[resourceGroup().location]", |
290 | | - "dblocation": "[resourceGroup().location]", |
291 | 319 | "cosmosdbDatabase": "cmsadb", |
292 | 320 | "cosmosdbBatchContainer": "cmsabatch", |
293 | 321 | "cosmosdbFileContainer": "cmsafile", |
294 | 322 | "cosmosdbLogContainer": "cmsalog", |
295 | | - "deploymentType": "GlobalStandard", |
296 | 323 | "containerName": "appstorage", |
297 | | - "llmModel": "gpt-4o", |
298 | 324 | "storageSkuName": "Standard_LRS", |
299 | 325 | "storageContainerName": "[replace(replace(replace(replace(format('{0}cast', variables('ResourcePrefix')), '-', ''), '_', ''), '.', ''), '/', '')]", |
300 | | - "gptModelVersion": "2024-08-06", |
301 | 326 | "azureAiServicesName": "[format('{0}{1}', variables('abbrs').ai.aiServices, variables('ResourcePrefix'))]", |
302 | 327 | "aiModelDeployments": [ |
303 | 328 | { |
304 | | - "name": "[variables('llmModel')]", |
305 | | - "model": "[variables('llmModel')]", |
306 | | - "version": "[variables('gptModelVersion')]", |
| 329 | + "name": "[parameters('llmModel')]", |
| 330 | + "model": "[parameters('llmModel')]", |
| 331 | + "version": "[parameters('gptModelVersion')]", |
307 | 332 | "sku": { |
308 | | - "name": "[variables('deploymentType')]", |
| 333 | + "name": "[parameters('deploymentType')]", |
309 | 334 | "capacity": "[parameters('capacity')]" |
310 | 335 | }, |
311 | 336 | "raiPolicyName": "Microsoft.Default" |
|
321 | 346 | "type": "Microsoft.CognitiveServices/accounts", |
322 | 347 | "apiVersion": "2024-04-01-preview", |
323 | 348 | "name": "[variables('azureAiServicesName')]", |
324 | | - "location": "[variables('location')]", |
| 349 | + "location": "[parameters('AzureAiServiceLocation')]", |
325 | 350 | "sku": { |
326 | 351 | "name": "S0" |
327 | 352 | }, |
|
360 | 385 | "type": "Microsoft.App/containerApps", |
361 | 386 | "apiVersion": "2023-05-01", |
362 | 387 | "name": "[toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]", |
363 | | - "location": "[variables('location')]", |
| 388 | + "location": "[parameters('solutionLocation')]", |
364 | 389 | "identity": { |
365 | 390 | "type": "SystemAssigned" |
366 | 391 | }, |
|
380 | 405 | "containers": [ |
381 | 406 | { |
382 | 407 | "name": "cmsabackend", |
383 | | - "image": "[format('cmsacontainerreg.azurecr.io/cmsabackend:{0}', variables('imageVersion'))]", |
| 408 | + "image": "[format('cmsacontainerreg.azurecr.io/cmsabackend:{0}', parameters('imageVersion'))]", |
384 | 409 | "env": [ |
385 | 410 | { |
386 | 411 | "name": "COSMOSDB_ENDPOINT", |
|
420 | 445 | }, |
421 | 446 | { |
422 | 447 | "name": "MIGRATOR_AGENT_MODEL_DEPLOY", |
423 | | - "value": "[variables('llmModel')]" |
| 448 | + "value": "[parameters('llmModel')]" |
424 | 449 | }, |
425 | 450 | { |
426 | 451 | "name": "PICKER_AGENT_MODEL_DEPLOY", |
427 | | - "value": "[variables('llmModel')]" |
| 452 | + "value": "[parameters('llmModel')]" |
428 | 453 | }, |
429 | 454 | { |
430 | 455 | "name": "FIXER_AGENT_MODEL_DEPLOY", |
431 | | - "value": "[variables('llmModel')]" |
| 456 | + "value": "[parameters('llmModel')]" |
432 | 457 | }, |
433 | 458 | { |
434 | 459 | "name": "SEMANTIC_VERIFIER_AGENT_MODEL_DEPLOY", |
435 | | - "value": "[variables('llmModel')]" |
| 460 | + "value": "[parameters('llmModel')]" |
436 | 461 | }, |
437 | 462 | { |
438 | 463 | "name": "SYNTAX_CHECKER_AGENT_MODEL_DEPLOY", |
439 | | - "value": "[variables('llmModel')]" |
| 464 | + "value": "[parameters('llmModel')]" |
440 | 465 | }, |
441 | 466 | { |
442 | 467 | "name": "SELECTION_MODEL_DEPLOY", |
443 | | - "value": "[variables('llmModel')]" |
| 468 | + "value": "[parameters('llmModel')]" |
444 | 469 | }, |
445 | 470 | { |
446 | 471 | "name": "TERMINATION_MODEL_DEPLOY", |
447 | | - "value": "[variables('llmModel')]" |
| 472 | + "value": "[parameters('llmModel')]" |
448 | 473 | }, |
449 | 474 | { |
450 | 475 | "name": "AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME", |
451 | | - "value": "[variables('llmModel')]" |
| 476 | + "value": "[parameters('llmModel')]" |
452 | 477 | }, |
453 | 478 | { |
454 | 479 | "name": "AZURE_AI_AGENT_PROJECT_NAME", |
|
486 | 511 | "type": "Microsoft.Storage/storageAccounts", |
487 | 512 | "apiVersion": "2022-09-01", |
488 | 513 | "name": "[variables('storageContainerName')]", |
489 | | - "location": "[variables('location')]", |
| 514 | + "location": "[parameters('solutionLocation')]", |
490 | 515 | "sku": { |
491 | 516 | "name": "[variables('storageSkuName')]" |
492 | 517 | }, |
|
609 | 634 | "value": "[variables('ResourcePrefix')]" |
610 | 635 | }, |
611 | 636 | "solutionLocation": { |
612 | | - "value": "[variables('location')]" |
| 637 | + "value": "[parameters('solutionLocation')]" |
613 | 638 | } |
614 | 639 | }, |
615 | 640 | "template": { |
|
706 | 731 | "value": "[variables('ResourcePrefix')]" |
707 | 732 | }, |
708 | 733 | "solutionLocation": { |
709 | | - "value": "[variables('location')]" |
| 734 | + "value": "[parameters('solutionLocation')]" |
710 | 735 | }, |
711 | 736 | "managedIdentityObjectId": { |
712 | 737 | "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]" |
|
830 | 855 | "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault'), '2022-09-01').outputs.keyvaultName.value]" |
831 | 856 | }, |
832 | 857 | "gptModelName": { |
833 | | - "value": "[variables('llmModel')]" |
| 858 | + "value": "[parameters('llmModel')]" |
834 | 859 | }, |
835 | 860 | "gptModelVersion": { |
836 | | - "value": "[variables('gptModelVersion')]" |
| 861 | + "value": "[parameters('gptModelVersion')]" |
837 | 862 | }, |
838 | 863 | "managedIdentityObjectId": { |
839 | 864 | "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]" |
|
1489 | 1514 | "value": "[toLower(format('{0}manenv', variables('ResourcePrefix')))]" |
1490 | 1515 | }, |
1491 | 1516 | "location": { |
1492 | | - "value": "[variables('location')]" |
| 1517 | + "value": "[parameters('solutionLocation')]" |
1493 | 1518 | }, |
1494 | 1519 | "zoneRedundant": { |
1495 | 1520 | "value": false |
|
2108 | 2133 | "value": true |
2109 | 2134 | }, |
2110 | 2135 | "location": { |
2111 | | - "value": "[variables('dblocation')]" |
| 2136 | + "value": "[parameters('solutionLocation')]" |
2112 | 2137 | }, |
2113 | 2138 | "managedIdentities": { |
2114 | 2139 | "value": { |
|
2134 | 2159 | { |
2135 | 2160 | "failoverPriority": 0, |
2136 | 2161 | "isZoneRedundant": false, |
2137 | | - "locationName": "[variables('dblocation')]" |
| 2162 | + "locationName": "[parameters('solutionLocation')]" |
2138 | 2163 | } |
2139 | 2164 | ] |
2140 | 2165 | }, |
|
5934 | 5959 | "value": "[format('https://{0}', reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2023-05-01').configuration.ingress.fqdn)]" |
5935 | 5960 | } |
5936 | 5961 | ], |
5937 | | - "image": "[format('cmsacontainerreg.azurecr.io/cmsafrontend:{0}', variables('imageVersion'))]", |
| 5962 | + "image": "[format('cmsacontainerreg.azurecr.io/cmsafrontend:{0}', parameters('imageVersion'))]", |
5938 | 5963 | "name": "cmsafrontend", |
5939 | 5964 | "resources": { |
5940 | 5965 | "cpu": "1", |
|
5962 | 5987 | "value": "[toLower(format('{0}{1}Frontend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]" |
5963 | 5988 | }, |
5964 | 5989 | "location": { |
5965 | | - "value": "[variables('location')]" |
| 5990 | + "value": "[parameters('solutionLocation')]" |
5966 | 5991 | } |
5967 | 5992 | }, |
5968 | 5993 | "template": { |
|
0 commit comments