Skip to content

Commit 8b50482

Browse files
Merge pull request microsoft#81 from microsoft/psl-cosmos-update
chore: Deploy Cosmos DB as Serverless Instead of Shared Database Throughput
2 parents 467d9f2 + 2396302 commit 8b50482

File tree

6 files changed

+10
-24
lines changed

6 files changed

+10
-24
lines changed

deploy/macae-continer-oc.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.32.4.45862",
9-
"templateHash": "13282901028774763433"
8+
"version": "0.33.93.31351",
9+
"templateHash": "9524414973084491660"
1010
}
1111
},
1212
"parameters": {
@@ -44,9 +44,6 @@
4444
"gpt4oCapacity": {
4545
"type": "int"
4646
},
47-
"cosmosThroughput": {
48-
"type": "int"
49-
},
5047
"containerAppSize": {
5148
"type": "object",
5249
"properties": {
@@ -67,7 +64,6 @@
6764
},
6865
"defaultValue": {
6966
"gpt4oCapacity": 50,
70-
"cosmosThroughput": 1000,
7167
"containerAppSize": {
7268
"cpu": "2.0",
7369
"memory": "4.0Gi",
@@ -147,9 +143,6 @@
147143
"resource": {
148144
"id": "autogen",
149145
"createMode": "Default"
150-
},
151-
"options": {
152-
"throughput": "[parameters('resourceSize').cosmosThroughput]"
153146
}
154147
},
155148
"dependsOn": [
@@ -244,6 +237,11 @@
244237
"failoverPriority": 0,
245238
"locationName": "[parameters('location')]"
246239
}
240+
],
241+
"capabilities": [
242+
{
243+
"name": "EnableServerless"
244+
}
247245
]
248246
}
249247
},

deploy/macae-continer.bicep

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ param tags object = {}
1515
@description('The size of the resources to deploy, defaults to a mini size')
1616
param resourceSize {
1717
gpt4oCapacity: int
18-
cosmosThroughput: int
1918
containerAppSize: {
2019
cpu: string
2120
memory: string
@@ -24,7 +23,6 @@ param resourceSize {
2423
}
2524
} = {
2625
gpt4oCapacity: 50
27-
cosmosThroughput: 1000
2826
containerAppSize: {
2927
cpu: '2.0'
3028
memory: '4.0Gi'
@@ -124,6 +122,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
124122
locationName: location
125123
}
126124
]
125+
capabilities: [ { name: 'EnableServerless' } ]
127126
}
128127

129128
resource contributorRoleDefinition 'sqlRoleDefinitions' existing = {
@@ -137,9 +136,6 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
137136
id: 'autogen'
138137
createMode: 'Default'
139138
}
140-
options: {
141-
throughput: resourceSize.cosmosThroughput
142-
}
143139
}
144140

145141
resource memoryContainer 'containers' = {

deploy/macae-dev.bicep

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
7777
locationName: cosmosLocation
7878
}
7979
]
80+
capabilities: [ { name: 'EnableServerless' } ]
8081
}
8182

8283
resource contributorRoleDefinition 'sqlRoleDefinitions' existing = {
@@ -99,9 +100,6 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
99100
id: 'autogen'
100101
createMode: 'Default'
101102
}
102-
options: {
103-
throughput: 400
104-
}
105103
}
106104

107105
resource memoryContainer 'containers' = {

deploy/macae-large.bicepparam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ using './macae.bicep'
22

33
param resourceSize = {
44
gpt4oCapacity: 50
5-
cosmosThroughput: 1000
65
containerAppSize: {
76
cpu: '2.0'
87
memory: '4.0Gi'

deploy/macae-mini.bicepparam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ using './macae.bicep'
22

33
param resourceSize = {
44
gpt4oCapacity: 15
5-
cosmosThroughput: 400
65
containerAppSize: {
76
cpu: '1.0'
87
memory: '2.0Gi'

deploy/macae.bicep

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ param tags object = {}
1818
@description('The size of the resources to deploy, defaults to a mini size')
1919
param resourceSize {
2020
gpt4oCapacity: int
21-
cosmosThroughput: int
2221
containerAppSize: {
2322
cpu: string
2423
memory: string
@@ -27,7 +26,6 @@ param resourceSize {
2726
}
2827
} = {
2928
gpt4oCapacity: 50
30-
cosmosThroughput: 1000
3129
containerAppSize: {
3230
cpu: '2.0'
3331
memory: '4.0Gi'
@@ -154,6 +152,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
154152
locationName: cosmosLocation
155153
}
156154
]
155+
capabilities: [ { name: 'EnableServerless' } ]
157156
}
158157

159158
resource contributorRoleDefinition 'sqlRoleDefinitions' existing = {
@@ -167,9 +166,6 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
167166
id: 'autogen'
168167
createMode: 'Default'
169168
}
170-
options: {
171-
throughput: resourceSize.cosmosThroughput
172-
}
173169
}
174170

175171
resource memoryContainer 'containers' = {

0 commit comments

Comments
 (0)