-
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
Support for MongoDB API versions 5.0 and 6.0 #25889
Comments
Thanks for raising this issue. This new version hasn't been released to Swagger. Once Service API supports it, we will take another look. |
A temporary workaround that worked for me is manually setting the version to 6.0 in Azure Portal (Features > Update MongoDB server version) and removing the mongo_server_version variable. |
Hi @neil-yechenwei, can you re-evaluate? The versions 5.0 and 6.0 are now clearly present in the stable API: https://github.com/Azure/azure-rest-api-specs/blob/32f566eb38af9593cfc1ed183362471c50d67fb2/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-05-15/cosmos-db.json#L9617 |
Any news? @neil-yechenwei |
@dv0gt @jvalteren it's worth noting that the API Version isn't fully deployed yet:
Unfortunately just because the API Definition exists within All of which is to say, unfortunately this remains blocked until the API is deployed (in multiple regions) - right now only the API definition is available. |
Thanks @tombuildsstuff, that is good to know (and unexpected). Do you know of any status page or other information source where these things can be tracked? I didn't expect to find myself at 'the cutting edge' of Azure infrastructure development with these simple things. Migration of a hosting project with relatively low complexity has required way more effort than expected because of little issues like this. It would greatly help predictability and thus planning if there would be more transparency on changes in API (preview status, availability etc). |
Any ETA on when this will be available? @jvalteren this can help https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/change-log or https://azure.microsoft.com/en-gb/updates/. Microsoft is never super clear when they will release things like this unfortunately. |
Cosmos DB also supports MongoDB API v7.0 |
The version can be changed using the azapi, the following worked for me to deploy version 6 resource "azurerm_resource_group" "example" {
name = "democosmos"
location = "westus2"
}
resource "azurerm_cosmosdb_account" "db" {
name = "stephitest"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
offer_type = "Standard"
kind = "MongoDB"
mongo_server_version = "4.2"
automatic_failover_enabled = false
capabilities {
name = "EnableServerless"
}
capabilities {
name = "EnableMongo"
}
consistency_policy {
consistency_level = "Session"
max_interval_in_seconds = 5
max_staleness_prefix = 100
}
geo_location {
failover_priority = 0
location = "westus2"
}
lifecycle {
ignore_changes = [ mongo_server_version ]
}
}
provider "azapi" {
subscription_id = var.subscription_id
}
resource "azapi_update_resource" "update" {
resource_id = azurerm_cosmosdb_account.db.id
type = "Microsoft.DocumentDB/databaseAccounts@2024-05-15"
body = {
properties = {
apiProperties = {
serverVersion = "6.0"
}
}
}
}
|
The code limiting mongo_server_version to version 3.2, 3.6, 4.0 and 4.2 seem to be here (just supplying for reference): This is the commit where 4.2 was added: |
Any news on this? |
Any updates? |
Hello, any updates on this? |
Hello, |
There is an existing PR #27763 |
@stephybun Please close this issue as it already has been fixed in #27763 |
Closed by #27763 |
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. |
Is there an existing issue for this?
Community Note
Description
Microsoft now supports running MongoDB API versions 5.0 and 6.0. Currently, these two version numbers cause a validation error when specified in the mongo_server_version variable on the azure_cosmosdb_account resource provider. The resource provider should be updated to reflect the newly available versions.
New or Affected Resource(s)/Data Source(s)
azurerm_cosmosdb_account
Potential Terraform Configuration
References
Support for MongoDB API 5.0:
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/feature-support-50
Support for MongoDB API 6.0:
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/feature-support-60
The text was updated successfully, but these errors were encountered: