Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_cosmosdb_sql_container needs throughput and TTL settings #4802

Closed
ukphillips opened this issue Nov 4, 2019 · 8 comments
Closed

azurerm_cosmosdb_sql_container needs throughput and TTL settings #4802

ukphillips opened this issue Nov 4, 2019 · 8 comments

Comments

@ukphillips
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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.

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"
  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.

References

#548

@katbyte
Copy link
Collaborator

katbyte commented Nov 9, 2019

related: #4620 #4309 #3623

would be fixed by #4616

@EDasilvaCorreia
Copy link

hi all, any news on this?

@ElvenSpellmaker
Copy link
Contributor

I just bumped into this, it seems you can't specify the throughput at the DB level either. 🤔

@ElvenSpellmaker
Copy link
Contributor

It seems #5203 will add this feature to both DB and Containers, we'll have to await a release 🙂

@tombuildsstuff tombuildsstuff added this to the v1.40.0 milestone Dec 18, 2019
@tombuildsstuff
Copy link
Contributor

Fixed via #5203 which will ship as a part of v1.40 - thanks for the ping @ElvenSpellmaker

@ghost
Copy link

ghost commented Jan 8, 2020

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 ...

@antempus
Copy link

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?

@ghost
Copy link

ghost commented Jan 18, 2020

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!

@ghost ghost locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants