From cbbffbbc568795ca9fbc54edee5865cee4f92fc3 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Sat, 25 Jun 2022 19:15:56 +0200 Subject: [PATCH] [Modules] MongoDB: Removed throughput if database is deployed serverless (#1571) * fix(mongodb): Removed throughput if database is deployed serverless * fix(mongodb): Added thoughput ternary to collections --- .../databaseAccounts/mongodbDatabases/collections/deploy.bicep | 2 +- .../databaseAccounts/mongodbDatabases/deploy.bicep | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/deploy.bicep index 803a5ccaf7..b3d7cb9e01 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/deploy.bicep @@ -44,7 +44,7 @@ resource collection 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/coll parent: databaseAccount::mongodbDatabase properties: { options: { - throughput: throughput + throughput: contains(databaseAccount.properties.capabilities, 'EnableServerless') ? null : throughput } resource: { id: name diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/deploy.bicep index 7ec003f4fd..91894ab55f 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/deploy.bicep @@ -43,7 +43,7 @@ resource mongodbDatabase 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases id: name } options: { - throughput: throughput + throughput: contains(databaseAccount.properties.capabilities, 'EnableServerless') ? null : throughput } } }