Skip to content

Commit 56e058b

Browse files
updated main.json file
1 parent 7e4530d commit 56e058b

1 file changed

Lines changed: 69 additions & 44 deletions

File tree

infra/main.json

Lines changed: 69 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,25 @@
1616
"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."
1717
}
1818
},
19+
"solutionLocation": {
20+
"type": "string",
21+
"defaultValue": "[resourceGroup().location]",
22+
"metadata": {
23+
"description": "Required. Location for all Resources except AI Foundry."
24+
}
25+
},
1926
"AzureAiServiceLocation": {
2027
"type": "string",
2128
"allowedValues": [
2229
"australiaeast",
23-
"brazilsouth",
24-
"canadacentral",
25-
"canadaeast",
2630
"eastus",
2731
"eastus2",
2832
"francecentral",
29-
"germanywestcentral",
3033
"japaneast",
31-
"koreacentral",
32-
"northcentralus",
3334
"norwayeast",
34-
"polandcentral",
35-
"southafricanorth",
36-
"southcentralus",
3735
"southindia",
3836
"swedencentral",
39-
"switzerlandnorth",
40-
"uaenorth",
4137
"uksouth",
42-
"westeurope",
4338
"westus",
4439
"westus3"
4540
],
@@ -49,7 +44,43 @@
4944
},
5045
"capacity": {
5146
"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+
}
5384
}
5485
},
5586
"variables": {
@@ -285,27 +316,21 @@
285316
"uniqueId": "[toLower(uniqueString(subscription().id, variables('safePrefix'), resourceGroup().location))]",
286317
"UniquePrefix": "[format('cm{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]",
287318
"ResourcePrefix": "[take(format('cm{0}{1}', variables('safePrefix'), variables('UniquePrefix')), 15)]",
288-
"imageVersion": "latest",
289-
"location": "[resourceGroup().location]",
290-
"dblocation": "[resourceGroup().location]",
291319
"cosmosdbDatabase": "cmsadb",
292320
"cosmosdbBatchContainer": "cmsabatch",
293321
"cosmosdbFileContainer": "cmsafile",
294322
"cosmosdbLogContainer": "cmsalog",
295-
"deploymentType": "GlobalStandard",
296323
"containerName": "appstorage",
297-
"llmModel": "gpt-4o",
298324
"storageSkuName": "Standard_LRS",
299325
"storageContainerName": "[replace(replace(replace(replace(format('{0}cast', variables('ResourcePrefix')), '-', ''), '_', ''), '.', ''), '/', '')]",
300-
"gptModelVersion": "2024-08-06",
301326
"azureAiServicesName": "[format('{0}{1}', variables('abbrs').ai.aiServices, variables('ResourcePrefix'))]",
302327
"aiModelDeployments": [
303328
{
304-
"name": "[variables('llmModel')]",
305-
"model": "[variables('llmModel')]",
306-
"version": "[variables('gptModelVersion')]",
329+
"name": "[parameters('llmModel')]",
330+
"model": "[parameters('llmModel')]",
331+
"version": "[parameters('gptModelVersion')]",
307332
"sku": {
308-
"name": "[variables('deploymentType')]",
333+
"name": "[parameters('deploymentType')]",
309334
"capacity": "[parameters('capacity')]"
310335
},
311336
"raiPolicyName": "Microsoft.Default"
@@ -321,7 +346,7 @@
321346
"type": "Microsoft.CognitiveServices/accounts",
322347
"apiVersion": "2024-04-01-preview",
323348
"name": "[variables('azureAiServicesName')]",
324-
"location": "[variables('location')]",
349+
"location": "[parameters('AzureAiServiceLocation')]",
325350
"sku": {
326351
"name": "S0"
327352
},
@@ -360,7 +385,7 @@
360385
"type": "Microsoft.App/containerApps",
361386
"apiVersion": "2023-05-01",
362387
"name": "[toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]",
363-
"location": "[variables('location')]",
388+
"location": "[parameters('solutionLocation')]",
364389
"identity": {
365390
"type": "SystemAssigned"
366391
},
@@ -380,7 +405,7 @@
380405
"containers": [
381406
{
382407
"name": "cmsabackend",
383-
"image": "[format('cmsacontainerreg.azurecr.io/cmsabackend:{0}', variables('imageVersion'))]",
408+
"image": "[format('cmsacontainerreg.azurecr.io/cmsabackend:{0}', parameters('imageVersion'))]",
384409
"env": [
385410
{
386411
"name": "COSMOSDB_ENDPOINT",
@@ -420,35 +445,35 @@
420445
},
421446
{
422447
"name": "MIGRATOR_AGENT_MODEL_DEPLOY",
423-
"value": "[variables('llmModel')]"
448+
"value": "[parameters('llmModel')]"
424449
},
425450
{
426451
"name": "PICKER_AGENT_MODEL_DEPLOY",
427-
"value": "[variables('llmModel')]"
452+
"value": "[parameters('llmModel')]"
428453
},
429454
{
430455
"name": "FIXER_AGENT_MODEL_DEPLOY",
431-
"value": "[variables('llmModel')]"
456+
"value": "[parameters('llmModel')]"
432457
},
433458
{
434459
"name": "SEMANTIC_VERIFIER_AGENT_MODEL_DEPLOY",
435-
"value": "[variables('llmModel')]"
460+
"value": "[parameters('llmModel')]"
436461
},
437462
{
438463
"name": "SYNTAX_CHECKER_AGENT_MODEL_DEPLOY",
439-
"value": "[variables('llmModel')]"
464+
"value": "[parameters('llmModel')]"
440465
},
441466
{
442467
"name": "SELECTION_MODEL_DEPLOY",
443-
"value": "[variables('llmModel')]"
468+
"value": "[parameters('llmModel')]"
444469
},
445470
{
446471
"name": "TERMINATION_MODEL_DEPLOY",
447-
"value": "[variables('llmModel')]"
472+
"value": "[parameters('llmModel')]"
448473
},
449474
{
450475
"name": "AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME",
451-
"value": "[variables('llmModel')]"
476+
"value": "[parameters('llmModel')]"
452477
},
453478
{
454479
"name": "AZURE_AI_AGENT_PROJECT_NAME",
@@ -486,7 +511,7 @@
486511
"type": "Microsoft.Storage/storageAccounts",
487512
"apiVersion": "2022-09-01",
488513
"name": "[variables('storageContainerName')]",
489-
"location": "[variables('location')]",
514+
"location": "[parameters('solutionLocation')]",
490515
"sku": {
491516
"name": "[variables('storageSkuName')]"
492517
},
@@ -609,7 +634,7 @@
609634
"value": "[variables('ResourcePrefix')]"
610635
},
611636
"solutionLocation": {
612-
"value": "[variables('location')]"
637+
"value": "[parameters('solutionLocation')]"
613638
}
614639
},
615640
"template": {
@@ -706,7 +731,7 @@
706731
"value": "[variables('ResourcePrefix')]"
707732
},
708733
"solutionLocation": {
709-
"value": "[variables('location')]"
734+
"value": "[parameters('solutionLocation')]"
710735
},
711736
"managedIdentityObjectId": {
712737
"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,10 +855,10 @@
830855
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault'), '2022-09-01').outputs.keyvaultName.value]"
831856
},
832857
"gptModelName": {
833-
"value": "[variables('llmModel')]"
858+
"value": "[parameters('llmModel')]"
834859
},
835860
"gptModelVersion": {
836-
"value": "[variables('gptModelVersion')]"
861+
"value": "[parameters('gptModelVersion')]"
837862
},
838863
"managedIdentityObjectId": {
839864
"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,7 +1514,7 @@
14891514
"value": "[toLower(format('{0}manenv', variables('ResourcePrefix')))]"
14901515
},
14911516
"location": {
1492-
"value": "[variables('location')]"
1517+
"value": "[parameters('solutionLocation')]"
14931518
},
14941519
"zoneRedundant": {
14951520
"value": false
@@ -2108,7 +2133,7 @@
21082133
"value": true
21092134
},
21102135
"location": {
2111-
"value": "[variables('dblocation')]"
2136+
"value": "[parameters('solutionLocation')]"
21122137
},
21132138
"managedIdentities": {
21142139
"value": {
@@ -2134,7 +2159,7 @@
21342159
{
21352160
"failoverPriority": 0,
21362161
"isZoneRedundant": false,
2137-
"locationName": "[variables('dblocation')]"
2162+
"locationName": "[parameters('solutionLocation')]"
21382163
}
21392164
]
21402165
},
@@ -5934,7 +5959,7 @@
59345959
"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)]"
59355960
}
59365961
],
5937-
"image": "[format('cmsacontainerreg.azurecr.io/cmsafrontend:{0}', variables('imageVersion'))]",
5962+
"image": "[format('cmsacontainerreg.azurecr.io/cmsafrontend:{0}', parameters('imageVersion'))]",
59385963
"name": "cmsafrontend",
59395964
"resources": {
59405965
"cpu": "1",
@@ -5962,7 +5987,7 @@
59625987
"value": "[toLower(format('{0}{1}Frontend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]"
59635988
},
59645989
"location": {
5965-
"value": "[variables('location')]"
5990+
"value": "[parameters('solutionLocation')]"
59665991
}
59675992
},
59685993
"template": {

0 commit comments

Comments
 (0)