Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ targetScope = 'resourceGroup'
'westus3'
])
@description('Location for all Ai services resources. This location can be different from the resource group location.')
param azureOpenAILocation string = 'eastus2'
param azureOpenAILocation string

@minLength(3)
@maxLength(20)
Expand Down Expand Up @@ -218,11 +218,11 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
name: '00000000-0000-0000-0000-000000000002'
}

resource autogenDb 'sqlDatabases' = {
name: 'autogen'
resource macaeDb 'sqlDatabases' = {
name: 'macae'
properties: {
resource: {
id: 'autogen'
id: 'macae'
createMode: 'Default'
}
}
Expand Down Expand Up @@ -339,11 +339,11 @@ resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
}
{
name: 'COSMOSDB_DATABASE'
value: cosmos::autogenDb.name
value: cosmos::macaeDb.name
}
{
name: 'COSMOSDB_CONTAINER'
value: cosmos::autogenDb::memoryContainer.name
value: cosmos::macaeDb::memoryContainer.name
}
{
name: 'AZURE_OPENAI_ENDPOINT'
Expand Down
3 changes: 2 additions & 1 deletion infra/main.bicepparam
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using './main.bicep'

param environmentName = readEnvironmentVariable('AZURE_ENV_NAME', 'macaetemplate')
param AZURE_LOCATION = readEnvironmentVariable('AZURE_ENV_LOCATION', '')
param AZURE_LOCATION = readEnvironmentVariable('AZURE_LOCATION', '')
param azureOpenAILocation = readEnvironmentVariable('AZURE_OPENAI_LOCATION', 'eastus2')
21 changes: 10 additions & 11 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
"_generator": {
"name": "bicep",
"version": "0.35.1.17967",
"templateHash": "12016977205829849477"
"templateHash": "5028939591915540887"
}
},
"parameters": {
"azureOpenAILocation": {
"type": "string",
"defaultValue": "eastus2",
"allowedValues": [
"australiaeast",
"brazilsouth",
Expand Down Expand Up @@ -362,10 +361,10 @@
]
},
"resources": {
"cosmos::autogenDb::memoryContainer": {
"cosmos::macaeDb::memoryContainer": {
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"apiVersion": "2024-05-15",
"name": "[format('{0}/{1}/{2}', format('{0}{1}', variables('abbrs').databases.cosmosDBDatabase, variables('solutionPrefix')), 'autogen', 'memory')]",
"name": "[format('{0}/{1}/{2}', format('{0}{1}', variables('abbrs').databases.cosmosDBDatabase, variables('solutionPrefix')), 'macae', 'memory')]",
"properties": {
"resource": {
"id": "memory",
Expand All @@ -379,7 +378,7 @@
}
},
"dependsOn": [
"cosmos::autogenDb"
"cosmos::macaeDb"
]
},
"cosmos::contributorRoleDefinition": {
Expand All @@ -391,13 +390,13 @@
"cosmos"
]
},
"cosmos::autogenDb": {
"cosmos::macaeDb": {
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"apiVersion": "2024-05-15",
"name": "[format('{0}/{1}', format('{0}{1}', variables('abbrs').databases.cosmosDBDatabase, variables('solutionPrefix')), 'autogen')]",
"name": "[format('{0}/{1}', format('{0}{1}', variables('abbrs').databases.cosmosDBDatabase, variables('solutionPrefix')), 'macae')]",
"properties": {
"resource": {
"id": "autogen",
"id": "macae",
"createMode": "Default"
}
},
Expand Down Expand Up @@ -626,7 +625,7 @@
},
{
"name": "COSMOSDB_DATABASE",
"value": "autogen"
"value": "macae"
},
{
"name": "COSMOSDB_CONTAINER",
Expand Down Expand Up @@ -687,8 +686,8 @@
"appInsights",
"containerAppEnv",
"cosmos",
"cosmos::autogenDb",
"cosmos::autogenDb::memoryContainer",
"cosmos::macaeDb",
"cosmos::macaeDb::memoryContainer",
"pullIdentity"
],
"metadata": {
Expand Down
Loading