-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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_database
doesn't call get throughput api when cosmos account is serverless
#9187
azurerm_cosmosdb_sql_database
doesn't call get throughput api when cosmos account is serverless
#9187
Conversation
Awesome, greatly needed. I guess this will fix the following error that happens for Cosmos SQL: Error: Error reading Throughput on Cosmos SQL Database "--snip--" (Account: "--snip--") ID: documentdb.SQLResourcesClient#GetSQLDatabaseThroughput: 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: c5fe135d-2c40-4f04-a3b6-9b9368c29436, Microsoft.Azure.Documents.Common/2.11.0"}, Request URI: /offers, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.11.0" resource "azurerm_cosmosdb_account" "db" {
name = "${var.prefix}-${var.environment}-cosmosdb-${var.suffix}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
offer_type = "Standard"
kind = "GlobalDocumentDB"
enable_automatic_failover = true
capabilities {
name = "EnableServerless"
}
consistency_policy {
consistency_level = "BoundedStaleness"
max_interval_in_seconds = 10
max_staleness_prefix = 200
}
geo_location {
location = azurerm_resource_group.rg.location
failover_priority = 0
}
}
resource "azurerm_cosmosdb_sql_database" "db" {
name = "${var.prefix}-${var.environment}-cosmossql-${var.suffix}"
resource_group_name = azurerm_cosmosdb_account.db.resource_group_name
account_name = azurerm_cosmosdb_account.db.name
} |
@mariussm yep, this is aimed at fixing exactly that |
Hey @tombuildsstuff is there something I can do to move this one forward? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ilmax
Thanks for replicating the changes for the SQL resource. This LGTM 👍. I've got the acceptance tests running at the moment, so assuming they pass we'll get this merged.
This has been released in version 2.36.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 = "~> 2.36.0"
}
# ... other configuration ... |
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! |
Fixes #8175
This is based on #8673 /cc @yupwei68