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

Set throughput at CosmosDB SQL database level #3623

Closed
RiverPhillips opened this issue Jun 10, 2019 · 16 comments · Fixed by #5203
Closed

Set throughput at CosmosDB SQL database level #3623

RiverPhillips opened this issue Jun 10, 2019 · 16 comments · Fixed by #5203

Comments

@RiverPhillips
Copy link
Contributor

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

CosmosDB suports setting throughput at a database level and shared across collections, this is not currently possible when provisioning using terraform.

This affects the cost and performance so is needed for this resource

New or Affected Resource(s)

  • azurerm_cosmosdb_sql_database

Potential Terraform Configuration

resource "azurerm_cosmosdb_sql_database" "example" {
  name                          = "tfex-cosmos-mongo-db"
  resource_group_name = "${data.azurerm_cosmosdb_account.example.resource_group_name}"
  account_name             = "${data.azurerm_cosmosdb_account.example.name}"
  throughput                 = 400
}
@jpovey
Copy link
Contributor

jpovey commented Jun 10, 2019

@fmjrey
Copy link

fmjrey commented Jun 11, 2019

I can only encourage this feature: we recently migrated from a MongoDB in Heroku to a CosmosDB in Azure, and now realise that each collection within the terraformed CosmosDB is a separate cost item. Collections in MongoDB are not the same in CosmosDB, the former uses them for storing docs of a same type, while the latter is able to store docs of different types.

@christonog

This comment has been minimized.

@christonog
Copy link

Actually, my issue looks to be related to #3586

@katbyte
Copy link
Collaborator

katbyte commented Jul 9, 2019

@christonog, looks like this is a duplicate of #3586 so i am going to close this. If you think this is an error please feel free to reopen it!

@katbyte
Copy link
Collaborator

katbyte commented Jul 9, 2019

Actually upon a closer look that is mongo, and this is SQL, reopening. apologies!

@katbyte katbyte reopened this Jul 9, 2019
@tminhein

This comment has been minimized.

@tminhein

This comment has been minimized.

@sawyerh
Copy link

sawyerh commented Aug 29, 2019

For those getting confused by @jpovey's comment – My impression is: it's being pointed out that this looks possible using the Go SDK (though I'm not sure how you pass in that map of strings), which the Azure Terraform provider depends upon. However, it doesn't appear that this is supported by the provider right now, which this issue is requesting. cc @tminhein

@ronaldmiranda
Copy link

The options are set using a map of strings https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/resource_arm_cosmosdb_sql_database.go (see line 75)

please explain with a sample. I've tried {througtput = 400}. it's not working.

Until this is not implemented, im using via azure template.

@MartinKosicky

This comment has been minimized.

@ronaldmiranda
Copy link

So is this ever going to be implemented? The cosmos terraform provider is useless if i cannot specify throughput. I would have to create a separate script to configure this

Is just like i mentioned above, im using the azurerm template provider.

@jpovey
Copy link
Contributor

jpovey commented Sep 12, 2019

So is this ever going to be implemented? The cosmos terraform provider is useless if i cannot specify throughput. I would have to create a separate script to configure this

Is just like i mentioned above, im using the azurerm template provider.

You can work around pretty much anything using a dreaded ARM template but this is really not ideal and negates the main advantages of terraform.

Any update on whether the throughout configuration will be included in future releases would be appreciated.

@markti
Copy link
Contributor

markti commented Nov 8, 2019

Very sad throughput cannot be controlled when deploying terraform. This is a critical issue as you cannot change the throughput configuration of a SQL Database once it has been deployed. It requires a drop / create.

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

@ghost
Copy link

ghost commented Mar 28, 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 Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.