-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.bicep
37 lines (33 loc) · 906 Bytes
/
main.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@description('Cosmos DB account name')
param accountName string = 'cosmos-${uniqueString(resourceGroup().id)}'
@description('Location for the Cosmos DB account.')
param location string = resourceGroup().location
@description('The name for the Core (SQL) database')
param databaseName string
resource cosmosAccount 'Microsoft.DocumentDB/databaseAccounts@2021-04-15' = {
name: toLower(accountName)
location: location
properties: {
enableFreeTier: true
databaseAccountOfferType: 'Standard'
consistencyPolicy: {
defaultConsistencyLevel: 'Session'
}
locations: [
{
locationName: location
}
]
}
}
resource cosmosDB 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2021-04-15' = {
name: '${cosmosAccount.name}/${toLower(databaseName)}'
properties: {
resource: {
id: databaseName
}
options: {
throughput: 400
}
}
}