Skip to content

Commit e9ba19c

Browse files
authored
Update main.bicep
1 parent 78eef2f commit e9ba19c

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

infra/main.bicep

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
targetScope = 'resourceGroup'
22
@description('Location for all resources.')
3-
param location string = 'EastUS2'
3+
param location string = 'EastUS2' //Fixed for model availability, change back to resourceGroup().location
44

55
@allowed([
66
'australiaeast'
@@ -33,7 +33,7 @@ param azureOpenAILocation string = 'eastus2' // The location used for all deploy
3333
@minLength(3)
3434
@maxLength(20)
3535
@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.')
36-
param prefix string
36+
param prefix string = take('macaeo-${uniqueString(resourceGroup().id)}', 10)
3737

3838
@description('Tags to apply to all deployed resources')
3939
param tags object = {}
@@ -56,7 +56,7 @@ param resourceSize {
5656
maxReplicas: 1
5757
}
5858
}
59-
param capacity int = 40
59+
param capacity int = 10
6060

6161

6262
var modelVersion = '2024-08-06'
@@ -72,7 +72,7 @@ var backendDockerImageURL = '${resgistryName}.azurecr.io/macaebackend:${appVersi
7272
var frontendDockerImageURL = '${resgistryName}.azurecr.io/macaefrontend:${appVersion}'
7373

7474
var uniqueNameFormat = '${prefix}-{0}-${uniqueString(resourceGroup().id, prefix)}'
75-
var aoaiApiVersion = '2025-01-01-preview'
75+
var aoaiApiVersion = '2024-08-01-preview'
7676

7777
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
7878
name: format(uniqueNameFormat, 'logs')
@@ -120,7 +120,7 @@ resource aiServices 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' =
120120
properties: {
121121
customSubDomainName: aiServicesName
122122
apiProperties: {
123-
//statisticsEnabled: false
123+
statisticsEnabled: false
124124
}
125125
}
126126
}
@@ -333,9 +333,9 @@ resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
333333
name: 'COSMOSDB_CONTAINER'
334334
value: cosmos::autogenDb::memoryContainer.name
335335
}
336-
{
337-
name: 'AZURE_OPENAI_ENDPOINT'
338-
value: replace(aiServices.properties.endpoint, 'cognitiveservices.azure.com', 'openai.azure.com')
336+
{
337+
name: 'AZURE_OPENAI_ENDPOINT'
338+
value: aiServices.properties.endpoint
339339
}
340340
{
341341
name: 'AZURE_OPENAI_MODEL_NAME'
@@ -391,9 +391,9 @@ resource frontendAppServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
391391
location: location
392392
tags: tags
393393
sku: {
394-
name: 'B2'
394+
name: 'P1v2'
395395
capacity: 1
396-
tier: 'Basic'
396+
tier: 'PremiumV2'
397397
}
398398
properties: {
399399
reserved: true
@@ -428,10 +428,6 @@ resource frontendAppService 'Microsoft.Web/sites@2021-02-01' = {
428428
name: 'BACKEND_API_URL'
429429
value: 'https://${containerApp.properties.configuration.ingress.fqdn}'
430430
}
431-
{
432-
name: 'AUTH_ENABLED'
433-
value: 'false'
434-
}
435431
]
436432
}
437433
}

0 commit comments

Comments
 (0)