Skip to content

Commit 10ef8d2

Browse files
committed
testing var named imageName
1 parent 63996fd commit 10ef8d2

File tree

2 files changed

+27
-33
lines changed

2 files changed

+27
-33
lines changed

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var frontendDockerImageURL = '${resgistryName}.azurecr.io/macaefrontend:${appVer
7373

7474
var uniqueNameFormat = '${prefix}-{0}-${uniqueString(resourceGroup().id, prefix)}'
7575
var aoaiApiVersion = '2025-01-01-preview'
76-
76+
var imageName = frontendDockerImageURL
7777
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
7878
name: format(uniqueNameFormat, 'logs')
7979
location: location
@@ -411,7 +411,7 @@ resource frontendAppService 'Microsoft.Web/sites@2021-02-01' = {
411411
serverFarmId: frontendAppServicePlan.id
412412
reserved: true
413413
siteConfig: {
414-
linuxFxVersion: 'DOCKER|${frontendDockerImageURL}'
414+
linuxFxVersion: 'DOCKER|${imageName}'
415415
appSettings: [
416416
{
417417
name: 'DOCKER_REGISTRY_SERVER_URL'

infra/main.json

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,13 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.34.44.8038",
9-
"templateHash": "7719893060553487435"
8+
"version": "0.35.1.17967",
9+
"templateHash": "11782682784877206872"
1010
}
1111
},
1212
"parameters": {
13-
"location": {
14-
"type": "string",
15-
"metadata": {
16-
"description": "Location for all resources."
17-
}
18-
},
1913
"azureOpenAILocation": {
2014
"type": "string",
21-
"defaultValue": "eastus2",
2215
"allowedValues": [
2316
"australiaeast",
2417
"brazilsouth",
@@ -50,7 +43,6 @@
5043
},
5144
"prefix": {
5245
"type": "string",
53-
"defaultValue": "macae",
5446
"minLength": 3,
5547
"maxLength": 20,
5648
"metadata": {
@@ -107,6 +99,7 @@
10799
}
108100
},
109101
"variables": {
102+
"location": "[resourceGroup().location]",
110103
"modelVersion": "2024-08-06",
111104
"aiServicesName": "[format('{0}-aiservices', parameters('prefix'))]",
112105
"deploymentType": "GlobalStandard",
@@ -118,6 +111,7 @@
118111
"frontendDockerImageURL": "[format('{0}.azurecr.io/macaefrontend:{1}', variables('resgistryName'), variables('appVersion'))]",
119112
"uniqueNameFormat": "[format('{0}-{{0}}-{1}', parameters('prefix'), uniqueString(resourceGroup().id, parameters('prefix')))]",
120113
"aoaiApiVersion": "2025-01-01-preview",
114+
"imageName": "[variables('frontendDockerImageURL')]",
121115
"aiModelDeployments": [
122116
{
123117
"name": "[variables('gptModelVersion')]",
@@ -190,7 +184,7 @@
190184
"type": "Microsoft.OperationalInsights/workspaces",
191185
"apiVersion": "2023-09-01",
192186
"name": "[format(variables('uniqueNameFormat'), 'logs')]",
193-
"location": "[parameters('location')]",
187+
"location": "[variables('location')]",
194188
"tags": "[parameters('tags')]",
195189
"properties": {
196190
"retentionInDays": 30,
@@ -203,7 +197,7 @@
203197
"type": "Microsoft.Insights/components",
204198
"apiVersion": "2020-02-02-preview",
205199
"name": "[format(variables('uniqueNameFormat'), 'appins')]",
206-
"location": "[parameters('location')]",
200+
"location": "[variables('location')]",
207201
"kind": "web",
208202
"properties": {
209203
"Application_Type": "web",
@@ -217,7 +211,7 @@
217211
"type": "Microsoft.CognitiveServices/accounts",
218212
"apiVersion": "2024-04-01-preview",
219213
"name": "[variables('aiServicesName')]",
220-
"location": "[parameters('location')]",
214+
"location": "[variables('location')]",
221215
"sku": {
222216
"name": "S0"
223217
},
@@ -277,7 +271,7 @@
277271
"type": "Microsoft.DocumentDB/databaseAccounts",
278272
"apiVersion": "2024-05-15",
279273
"name": "[format(variables('uniqueNameFormat'), 'cosmos')]",
280-
"location": "[parameters('location')]",
274+
"location": "[variables('location')]",
281275
"tags": "[parameters('tags')]",
282276
"kind": "GlobalDocumentDB",
283277
"properties": {
@@ -286,7 +280,7 @@
286280
"locations": [
287281
{
288282
"failoverPriority": 0,
289-
"locationName": "[parameters('location')]"
283+
"locationName": "[variables('location')]"
290284
}
291285
],
292286
"capabilities": [
@@ -301,21 +295,21 @@
301295
"type": "Microsoft.ManagedIdentity/userAssignedIdentities",
302296
"apiVersion": "2023-07-31-preview",
303297
"name": "[format(variables('uniqueNameFormat'), 'containerapp-pull')]",
304-
"location": "[parameters('location')]"
298+
"location": "[variables('location')]"
305299
},
306300
"containerAppEnv": {
307301
"type": "Microsoft.App/managedEnvironments",
308302
"apiVersion": "2024-03-01",
309303
"name": "[format(variables('uniqueNameFormat'), 'containerapp')]",
310-
"location": "[parameters('location')]",
304+
"location": "[variables('location')]",
311305
"tags": "[parameters('tags')]",
312306
"properties": {
313307
"daprAIConnectionString": "[reference('appInsights').ConnectionString]",
314308
"appLogsConfiguration": {
315309
"destination": "log-analytics",
316310
"logAnalyticsConfiguration": {
317311
"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]"
319313
}
320314
}
321315
},
@@ -342,7 +336,7 @@
342336
"type": "Microsoft.App/containerApps",
343337
"apiVersion": "2024-03-01",
344338
"name": "[format('{0}-backend', parameters('prefix'))]",
345-
"location": "[parameters('location')]",
339+
"location": "[variables('location')]",
346340
"tags": "[parameters('tags')]",
347341
"identity": {
348342
"type": "SystemAssigned, UserAssigned",
@@ -468,7 +462,7 @@
468462
"type": "Microsoft.Web/serverfarms",
469463
"apiVersion": "2021-02-01",
470464
"name": "[format(variables('uniqueNameFormat'), 'frontend-plan')]",
471-
"location": "[parameters('location')]",
465+
"location": "[variables('location')]",
472466
"tags": "[parameters('tags')]",
473467
"sku": {
474468
"name": "P1v2",
@@ -484,14 +478,14 @@
484478
"type": "Microsoft.Web/sites",
485479
"apiVersion": "2021-02-01",
486480
"name": "[format(variables('uniqueNameFormat'), 'frontend')]",
487-
"location": "[parameters('location')]",
481+
"location": "[variables('location')]",
488482
"tags": "[parameters('tags')]",
489483
"kind": "app,linux,container",
490484
"properties": {
491485
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', format(variables('uniqueNameFormat'), 'frontend-plan'))]",
492486
"reserved": true,
493487
"siteConfig": {
494-
"linuxFxVersion": "[format('DOCKER|{0}', variables('frontendDockerImageURL'))]",
488+
"linuxFxVersion": "[format('DOCKER|{0}', variables('imageName'))]",
495489
"appSettings": [
496490
{
497491
"name": "DOCKER_REGISTRY_SERVER_URL",
@@ -568,7 +562,7 @@
568562
"value": "[parameters('prefix')]"
569563
},
570564
"solutionLocation": {
571-
"value": "[parameters('location')]"
565+
"value": "[variables('location')]"
572566
},
573567
"managedIdentityObjectId": {
574568
"value": "[reference('managedIdentityModule').outputs.managedIdentityOutput.value.objectId]"
@@ -580,8 +574,8 @@
580574
"metadata": {
581575
"_generator": {
582576
"name": "bicep",
583-
"version": "0.34.44.8038",
584-
"templateHash": "10664495342911727649"
577+
"version": "0.35.1.17967",
578+
"templateHash": "5761607453167859573"
585579
}
586580
},
587581
"parameters": {
@@ -706,7 +700,7 @@
706700
"value": "[reference('aiServices').endpoint]"
707701
},
708702
"aiServicesKey": {
709-
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2024-04-01-preview').key1]"
703+
"value": "[listKeys('aiServices', '2024-04-01-preview').key1]"
710704
},
711705
"aiServicesId": {
712706
"value": "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
@@ -718,8 +712,8 @@
718712
"metadata": {
719713
"_generator": {
720714
"name": "bicep",
721-
"version": "0.34.44.8038",
722-
"templateHash": "8087543237770345715"
715+
"version": "0.35.1.17967",
716+
"templateHash": "9490638595753234802"
723717
}
724718
},
725719
"parameters": {
@@ -1112,8 +1106,8 @@
11121106
"metadata": {
11131107
"_generator": {
11141108
"name": "bicep",
1115-
"version": "0.34.44.8038",
1116-
"templateHash": "11364190519186458619"
1109+
"version": "0.35.1.17967",
1110+
"templateHash": "12327197428621494853"
11171111
}
11181112
},
11191113
"parameters": {
@@ -1199,7 +1193,7 @@
11991193
"value": "2.69.0"
12001194
},
12011195
"location": {
1202-
"value": "[parameters('location')]"
1196+
"value": "[variables('location')]"
12031197
},
12041198
"managedIdentities": {
12051199
"value": {

0 commit comments

Comments
 (0)