|
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": "11782682784877206872" |
10 | 10 | } |
11 | 11 | }, |
12 | 12 | "parameters": { |
13 | | - "location": { |
14 | | - "type": "string", |
15 | | - "metadata": { |
16 | | - "description": "Location for all resources." |
17 | | - } |
18 | | - }, |
19 | 13 | "azureOpenAILocation": { |
20 | 14 | "type": "string", |
21 | | - "defaultValue": "eastus2", |
22 | 15 | "allowedValues": [ |
23 | 16 | "australiaeast", |
24 | 17 | "brazilsouth", |
|
50 | 43 | }, |
51 | 44 | "prefix": { |
52 | 45 | "type": "string", |
53 | | - "defaultValue": "macae", |
54 | 46 | "minLength": 3, |
55 | 47 | "maxLength": 20, |
56 | 48 | "metadata": { |
|
107 | 99 | } |
108 | 100 | }, |
109 | 101 | "variables": { |
| 102 | + "location": "[resourceGroup().location]", |
110 | 103 | "modelVersion": "2024-08-06", |
111 | 104 | "aiServicesName": "[format('{0}-aiservices', parameters('prefix'))]", |
112 | 105 | "deploymentType": "GlobalStandard", |
|
118 | 111 | "frontendDockerImageURL": "[format('{0}.azurecr.io/macaefrontend:{1}', variables('resgistryName'), variables('appVersion'))]", |
119 | 112 | "uniqueNameFormat": "[format('{0}-{{0}}-{1}', parameters('prefix'), uniqueString(resourceGroup().id, parameters('prefix')))]", |
120 | 113 | "aoaiApiVersion": "2025-01-01-preview", |
| 114 | + "imageName": "[variables('frontendDockerImageURL')]", |
121 | 115 | "aiModelDeployments": [ |
122 | 116 | { |
123 | 117 | "name": "[variables('gptModelVersion')]", |
|
190 | 184 | "type": "Microsoft.OperationalInsights/workspaces", |
191 | 185 | "apiVersion": "2023-09-01", |
192 | 186 | "name": "[format(variables('uniqueNameFormat'), 'logs')]", |
193 | | - "location": "[parameters('location')]", |
| 187 | + "location": "[variables('location')]", |
194 | 188 | "tags": "[parameters('tags')]", |
195 | 189 | "properties": { |
196 | 190 | "retentionInDays": 30, |
|
203 | 197 | "type": "Microsoft.Insights/components", |
204 | 198 | "apiVersion": "2020-02-02-preview", |
205 | 199 | "name": "[format(variables('uniqueNameFormat'), 'appins')]", |
206 | | - "location": "[parameters('location')]", |
| 200 | + "location": "[variables('location')]", |
207 | 201 | "kind": "web", |
208 | 202 | "properties": { |
209 | 203 | "Application_Type": "web", |
|
217 | 211 | "type": "Microsoft.CognitiveServices/accounts", |
218 | 212 | "apiVersion": "2024-04-01-preview", |
219 | 213 | "name": "[variables('aiServicesName')]", |
220 | | - "location": "[parameters('location')]", |
| 214 | + "location": "[variables('location')]", |
221 | 215 | "sku": { |
222 | 216 | "name": "S0" |
223 | 217 | }, |
|
277 | 271 | "type": "Microsoft.DocumentDB/databaseAccounts", |
278 | 272 | "apiVersion": "2024-05-15", |
279 | 273 | "name": "[format(variables('uniqueNameFormat'), 'cosmos')]", |
280 | | - "location": "[parameters('location')]", |
| 274 | + "location": "[variables('location')]", |
281 | 275 | "tags": "[parameters('tags')]", |
282 | 276 | "kind": "GlobalDocumentDB", |
283 | 277 | "properties": { |
|
286 | 280 | "locations": [ |
287 | 281 | { |
288 | 282 | "failoverPriority": 0, |
289 | | - "locationName": "[parameters('location')]" |
| 283 | + "locationName": "[variables('location')]" |
290 | 284 | } |
291 | 285 | ], |
292 | 286 | "capabilities": [ |
|
301 | 295 | "type": "Microsoft.ManagedIdentity/userAssignedIdentities", |
302 | 296 | "apiVersion": "2023-07-31-preview", |
303 | 297 | "name": "[format(variables('uniqueNameFormat'), 'containerapp-pull')]", |
304 | | - "location": "[parameters('location')]" |
| 298 | + "location": "[variables('location')]" |
305 | 299 | }, |
306 | 300 | "containerAppEnv": { |
307 | 301 | "type": "Microsoft.App/managedEnvironments", |
308 | 302 | "apiVersion": "2024-03-01", |
309 | 303 | "name": "[format(variables('uniqueNameFormat'), 'containerapp')]", |
310 | | - "location": "[parameters('location')]", |
| 304 | + "location": "[variables('location')]", |
311 | 305 | "tags": "[parameters('tags')]", |
312 | 306 | "properties": { |
313 | 307 | "daprAIConnectionString": "[reference('appInsights').ConnectionString]", |
314 | 308 | "appLogsConfiguration": { |
315 | 309 | "destination": "log-analytics", |
316 | 310 | "logAnalyticsConfiguration": { |
317 | 311 | "customerId": "[reference('logAnalytics').customerId]", |
318 | | - "sharedKey": "[listKeys(resourceId('Microsoft.OperationalInsights/workspaces', format(variables('uniqueNameFormat'), 'logs')), '2023-09-01').primarySharedKey]" |
| 312 | + "sharedKey": "[listKeys('logAnalytics', '2023-09-01').primarySharedKey]" |
319 | 313 | } |
320 | 314 | } |
321 | 315 | }, |
|
342 | 336 | "type": "Microsoft.App/containerApps", |
343 | 337 | "apiVersion": "2024-03-01", |
344 | 338 | "name": "[format('{0}-backend', parameters('prefix'))]", |
345 | | - "location": "[parameters('location')]", |
| 339 | + "location": "[variables('location')]", |
346 | 340 | "tags": "[parameters('tags')]", |
347 | 341 | "identity": { |
348 | 342 | "type": "SystemAssigned, UserAssigned", |
|
468 | 462 | "type": "Microsoft.Web/serverfarms", |
469 | 463 | "apiVersion": "2021-02-01", |
470 | 464 | "name": "[format(variables('uniqueNameFormat'), 'frontend-plan')]", |
471 | | - "location": "[parameters('location')]", |
| 465 | + "location": "[variables('location')]", |
472 | 466 | "tags": "[parameters('tags')]", |
473 | 467 | "sku": { |
474 | 468 | "name": "P1v2", |
|
484 | 478 | "type": "Microsoft.Web/sites", |
485 | 479 | "apiVersion": "2021-02-01", |
486 | 480 | "name": "[format(variables('uniqueNameFormat'), 'frontend')]", |
487 | | - "location": "[parameters('location')]", |
| 481 | + "location": "[variables('location')]", |
488 | 482 | "tags": "[parameters('tags')]", |
489 | 483 | "kind": "app,linux,container", |
490 | 484 | "properties": { |
491 | 485 | "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', format(variables('uniqueNameFormat'), 'frontend-plan'))]", |
492 | 486 | "reserved": true, |
493 | 487 | "siteConfig": { |
494 | | - "linuxFxVersion": "[format('DOCKER|{0}', variables('frontendDockerImageURL'))]", |
| 488 | + "linuxFxVersion": "[format('DOCKER|{0}', variables('imageName'))]", |
495 | 489 | "appSettings": [ |
496 | 490 | { |
497 | 491 | "name": "DOCKER_REGISTRY_SERVER_URL", |
|
568 | 562 | "value": "[parameters('prefix')]" |
569 | 563 | }, |
570 | 564 | "solutionLocation": { |
571 | | - "value": "[parameters('location')]" |
| 565 | + "value": "[variables('location')]" |
572 | 566 | }, |
573 | 567 | "managedIdentityObjectId": { |
574 | 568 | "value": "[reference('managedIdentityModule').outputs.managedIdentityOutput.value.objectId]" |
|
580 | 574 | "metadata": { |
581 | 575 | "_generator": { |
582 | 576 | "name": "bicep", |
583 | | - "version": "0.34.44.8038", |
584 | | - "templateHash": "10664495342911727649" |
| 577 | + "version": "0.35.1.17967", |
| 578 | + "templateHash": "5761607453167859573" |
585 | 579 | } |
586 | 580 | }, |
587 | 581 | "parameters": { |
|
706 | 700 | "value": "[reference('aiServices').endpoint]" |
707 | 701 | }, |
708 | 702 | "aiServicesKey": { |
709 | | - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]" |
| 703 | + "value": "[listKeys('aiServices', '2024-04-01-preview').key1]" |
710 | 704 | }, |
711 | 705 | "aiServicesId": { |
712 | 706 | "value": "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]" |
|
718 | 712 | "metadata": { |
719 | 713 | "_generator": { |
720 | 714 | "name": "bicep", |
721 | | - "version": "0.34.44.8038", |
722 | | - "templateHash": "8087543237770345715" |
| 715 | + "version": "0.35.1.17967", |
| 716 | + "templateHash": "9490638595753234802" |
723 | 717 | } |
724 | 718 | }, |
725 | 719 | "parameters": { |
|
1112 | 1106 | "metadata": { |
1113 | 1107 | "_generator": { |
1114 | 1108 | "name": "bicep", |
1115 | | - "version": "0.34.44.8038", |
1116 | | - "templateHash": "11364190519186458619" |
| 1109 | + "version": "0.35.1.17967", |
| 1110 | + "templateHash": "12327197428621494853" |
1117 | 1111 | } |
1118 | 1112 | }, |
1119 | 1113 | "parameters": { |
|
1199 | 1193 | "value": "2.69.0" |
1200 | 1194 | }, |
1201 | 1195 | "location": { |
1202 | | - "value": "[parameters('location')]" |
| 1196 | + "value": "[variables('location')]" |
1203 | 1197 | }, |
1204 | 1198 | "managedIdentities": { |
1205 | 1199 | "value": { |
|
0 commit comments