Skip to content

Commit

Permalink
Add analytics storage ttl for cosmos db sql container
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin committed Oct 23, 2024
1 parent dbc870c commit 177ce6f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions modules/azurerm/Cosmos-DB-SQL-Container/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 177ce6f

Please sign in to comment.