Skip to content

Change to container throughput #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 8, 2024
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/app/data.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ param tags object = {}

var database = {
name: 'cosmicworks' // Based on AdventureWorksLT data set
autoscale: true // Scale at the database level
throughput: 1000 // Enable autoscale with a minimum of 100 RUs and a maximum of 1,000 RUs
}

var containers = [
Expand All @@ -15,6 +13,8 @@ var containers = [
partitionKeyPaths: [
'/category' // Partition on the product category
]
autoscale: true // Scale at the container level
throughput: 1000 // Enable autoscale with a minimum of 100 RUs and a maximum of 1,000 RUs
}
]

Expand All @@ -24,9 +24,7 @@ module cosmosDbDatabase '../core/database/cosmos-db/nosql/database.bicep' = {
name: database.name
parentAccountName: databaseAccountName
tags: tags
setThroughput: true
autoscale: database.autoscale
throughput: database.throughput
setThroughput: false
}
}

Expand All @@ -37,7 +35,9 @@ module cosmosDbContainers '../core/database/cosmos-db/nosql/container.bicep' = [
parentAccountName: databaseAccountName
parentDatabaseName: cosmosDbDatabase.outputs.name
tags: tags
setThroughput: false
setThroughput: true
autoscale: container.autoscale
throughput: container.throughput
partitionKeyPaths: container.partitionKeyPaths
}
}]
Expand Down
1 change: 0 additions & 1 deletion infra/core/database/cosmos-db/account.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ resource account 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
}
}

output endpoint string = account.properties.documentEndpoint
output name string = account.name
2 changes: 1 addition & 1 deletion infra/core/database/cosmos-db/nosql/account.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module account '../account.bicep' = {
}
}

output endpoint string = account.outputs.endpoint
output endpoint string = 'https://${account.outputs.name}.documents.azure.com:443/'
output name string = account.outputs.name
2 changes: 1 addition & 1 deletion infra/core/database/cosmos-db/table/account.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ module account '../account.bicep' = {
}
}

output endpoint string = account.outputs.endpoint
output endpoint string = 'https://${account.outputs.name}.table.cosmos.azure.com:443/'
output name string = account.outputs.name