You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I am trying to create cosmosdb database in a cosmosdb serverless account..
I am using azurerm version = "=2.29.0" with terraform cli v0.13.3.
When we create the terraform plan, it says:
Terraform will perform the following actions:
# azurerm_cosmosdb_mongo_database.cm_db will be created
+ resource "azurerm_cosmosdb_mongo_database" "cm_db" {
+ account_name = "dev-db-account-cm-ms-esb-custom"
+ id = (known after apply)
+ name = "dev-cm-db"
+ resource_group_name = "custom-esb-automated-cm"
+ throughput = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
Pay attention to line " throughput = (known after apply) ". I suppose this is the cause of the error..
When I apply the generated plan I get this error:
Error: Error reading Throughput on Cosmos Mongo Database "dev-cm-db" (Account: "dev-db-account-cm-ms-esb-custom"): documentdb.MongoDBResourcesClient#GetMongoDBDatabaseThroughput: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Message: {\"code\":\"BadRequest\",\"message\":\"Reading or replacing offers is not supported for serverless accounts.\\r\\nActivityId: 0c1498ff-e19e-42d3-hidden, Microsoft.Azure.Documents.Common/2.11.0\"}, Request URI: /offers, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.11.0"
on main.tf line 97, in resource "azurerm_cosmosdb_mongo_database" "cm_db":
97: resource "azurerm_cosmosdb_mongo_database" "cm_db" {
I suppose azurerm plugin is trying to read the throughtput value from azure, what is not allowed when using serverless cosmosdb.
Anyone is facing the same problem? Do you know some workaround ?
My cosmosdb terraform code (as you can see, I am not giving any value to troughtput, because doing that is not allowed in serverless -you get a completely different error message- which is logical):
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
locked as resolved and limited conversation to collaborators
Dec 5, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello. I am trying to create cosmosdb database in a cosmosdb serverless account..
I am using azurerm version = "=2.29.0" with terraform cli v0.13.3.
When we create the terraform plan, it says:
Pay attention to line " throughput = (known after apply) ". I suppose this is the cause of the error..
When I apply the generated plan I get this error:
I suppose azurerm plugin is trying to read the throughtput value from azure, what is not allowed when using serverless cosmosdb.
Anyone is facing the same problem? Do you know some workaround ?
My cosmosdb terraform code (as you can see, I am not giving any value to troughtput, because doing that is not allowed in serverless -you get a completely different error message- which is logical):
Thank you!
The text was updated successfully, but these errors were encountered: