From 177ce6fbdedb911d19a2885d7a10d98383973df5 Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 23 Oct 2024 14:53:02 +0530 Subject: [PATCH] Add analytics storage ttl for cosmos db sql container --- .../cosmos_db_sql_container.tf | 17 +++++++++-------- .../Cosmos-DB-SQL-Container/variables.tf | 6 ++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/modules/azurerm/Cosmos-DB-SQL-Container/cosmos_db_sql_container.tf b/modules/azurerm/Cosmos-DB-SQL-Container/cosmos_db_sql_container.tf index d0ba80d7..cbf793b6 100644 --- a/modules/azurerm/Cosmos-DB-SQL-Container/cosmos_db_sql_container.tf +++ b/modules/azurerm/Cosmos-DB-SQL-Container/cosmos_db_sql_container.tf @@ -10,14 +10,15 @@ # -------------------------------------------------------------------------------------- resource "azurerm_cosmosdb_sql_container" "cosmosdb_sql_container" { - name = var.container_name - resource_group_name = var.resource_group_name - account_name = var.cosmos_db_account_name - database_name = var.cosmos_db_name - partition_key_path = var.partition_key_path - partition_key_version = var.partition_key_version - throughput = var.autoscale_enabled == false ? var.throughput : null - default_ttl = var.default_ttl + name = var.container_name + resource_group_name = var.resource_group_name + account_name = var.cosmos_db_account_name + database_name = var.cosmos_db_name + partition_key_path = var.partition_key_path + partition_key_version = var.partition_key_version + throughput = var.autoscale_enabled == false ? var.throughput : null + default_ttl = var.default_ttl + analytical_storage_ttl = var.analytical_storage_ttl dynamic "autoscale_settings" { for_each = local.autoscale_setting diff --git a/modules/azurerm/Cosmos-DB-SQL-Container/variables.tf b/modules/azurerm/Cosmos-DB-SQL-Container/variables.tf index 48063a4a..51254368 100644 --- a/modules/azurerm/Cosmos-DB-SQL-Container/variables.tf +++ b/modules/azurerm/Cosmos-DB-SQL-Container/variables.tf @@ -63,3 +63,9 @@ variable "default_ttl" { description = "The default time to live of SQL container." type = number } + +variable "analytical_storage_ttl" { + default = null + description = "The default time to live of Analytical Storage for this SQL container" + type = number +}