The new azurerm_cosmosdb_sql_container in 1.34 is a welcome addition to the provider - but lacking in some key areas to make it viable for managing real infrastructure. Currently it does not include throughput settings or TTL configuration. Both of these are vital to managing cost and performance of a production instance of cosmos.
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"
collection_throughput = "1000"
unique_key {
paths = ["/definition/idlong", "/definition/idshort"]
}
}
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.
https://github.com/terraform-providers/terraform-provider-azurerm/issues/548
related: #4620 #4309 #3623
would be fixed by #4616
hi all, any news on this?
I just bumped into this, it seems you can't specify the throughput at the DB level either. ๐ค
It seems #5203 will add this feature to both DB and Containers, we'll have to await a release ๐
Fixed via #5203 which will ship as a part of v1.40 - thanks for the ping @ElvenSpellmaker
This has been released in version 1.40.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 1.40.0"
}
# ... other configuration ...
Really glad this got merged in, this will help us move to using terraform for container management.
Will this now allow for non-destructive changes to the throughput/ttl on apply?
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
Fixed via #5203 which will ship as a part of v1.40 - thanks for the ping @ElvenSpellmaker