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
azurerm_cosmosdb_sql_container
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"]
}
}
This was mentioned in a previously closed issue. The resolution only addressed part of the issue (throughput) but sadly not the TTL part.
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!
Most helpful comment
taking a look into this. will have a PR up shortly!