Terraform-provider-azurerm: azurerm_cosmosdb_sql_container needs TTL settings

Created on 20 Jan 2020  ·  2Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Description

Currently there is no setting in azurerm_cosmosdb_sql_container for TTL configuration. This is a key feature of CosmosDb collections and without it the TTL overrides at the item level cannot be set.
https://docs.microsoft.com/en-us/azure/cosmos-db/time-to-live

New or Affected Resource(s)

azurerm_cosmosdb_sql_container

Potential Terraform Configuration ###

resource "azurerm_cosmosdb_sql_container" "example" {
  name                = "example-container"
  resource_group_name = "${azurerm_cosmosdb_account.example.resource_group_name}"
  account_name        = "${azurerm_cosmosdb_account.example.name}"
  database_name       = "${azurerm_cosmosdb_sql_database.example.name}"
  partition_key_path  = "/definition/id"
  ttl                 = 1000

  unique_key {
    paths = ["/definition/idlong", "/definition/idshort"]
  }
}

References

This was mentioned in a previously closed issue. The resolution only addressed part of the issue (throughput) but sadly not the TTL part.

4802

Most helpful comment

taking a look into this. will have a PR up shortly!

All 2 comments

taking a look into this. will have a PR up shortly!

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings