Skip to content

Commit

Permalink
Merge pull request #3 from EnergiMidt/16mbsupport
Browse files Browse the repository at this point in the history
Added config to enable support for 16MB document size in MongoDB
  • Loading branch information
martorg committed May 23, 2023
2 parents d87f629 + 8f2fe83 commit 853771a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ resource "azurerm_cosmosdb_account" "cosmosdb_account" {
}
}

dynamic "capabilities" {
for_each = var.capabilities_enable_mongo_16mb_document_support == false ? [] : [1]
content {
name = "EnableMongo16MBDocumentSupport"
}
}

# checkov:skip=CKV_AZURE_100: The `key_vault_key_id` variable is optional by default.
# https://docs.bridgecrew.io/docs/ensure-that-cosmos-db-accounts-have-customer-managed-keys-to-encrypt-data-at-rest
key_vault_key_id = var.key_vault_key_id
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ variable "capabilities_enable_serverless" {
default = false
}

variable "capabilities_enable_mongo_16mb_document_support" {
description = "(Optional) Configures the EnableMongo16MBDocumentSupport capability for this Cosmos DB account."
type = bool
default = false
}

# This `capabilities` variable is replaced by the use of above `capabilities_*` variables.
# variable "capabilities" {
# description = "(Optional) The capabilities which should be enabled for this Cosmos DB account. Value is a `capabilities` block as defined below. Changing this forces a new resource to be created."
Expand Down

0 comments on commit 853771a

Please sign in to comment.