terraform-provider-azurerm
terraform-provider-azurerm copied to clipboard
Support for CosmosDb for Mongodb vcore
Is there an existing issue for this?
- [X] I have searched the existing issues
Community Note
- Please vote on this issue by adding a :thumbsup: 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 and review the contribution guide to help.
Description
Add support for CosmosDb for MongoDb v5 (vcore) model.
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/
Given the differences between the RU and vcore setup I'm not sure if this would be an extension to the existing resource, or a new resource entirely.
New or Affected Resource(s)/Data Source(s)
azurerm_cosmosdb_account
Potential Terraform Configuration
resource "azurerm_resource_group" "example" {
name = "example-resource-group"
location = "West Europe"
}
resource "random_integer" "ri" {
min = 10000
max = 99999
}
resource "azurerm_cosmosdb_account" "db" {
name = "tfex-cosmos-db-${random_integer.ri.result}"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
offer_type = "Standard"
kind = "MongoDB"
enable_automatic_failover = true
capabilities {
name = "EnableAggregationPipeline"
}
capabilities {
name = "mongoEnableDocLevelTTL"
}
capabilities {
name = "MongoDBv5"
}
capabilities {
name = "EnableMongo"
}
node_group_specs = [
{
kind: 'Shard'
node_count: 1
sku: 'M40'
disk_size_gb: 128
enable_ha: false
}
]
}
### References
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/
The closest I could relate is cosmosdb_cassandra_datacenter
using Microsoft.DocumentDB/cassandraClusters
API. Similarly Mongo cluster resource could have cosmosdb_mongo_datacenter
name using Microsoft.DocumentDB/mongoClusters
API.
Lot of attributes are similar.
@mybayern1974 what is the 'preview' label? Does that related to Azure resources being in Preview? If so, CosmosDb for MongoDb vcore is GA now - announced at ignite.
@nickwilliams-codynamic The reason I marked this as preview
is, per what I've noticed, this feature only appears in the Azure service preview API version. To ensure it's technically safe to have Terraform AzureRM support this feature, I may suggest either wait for this feature appear in the Azure service stable API version or the Azure service team could confirm that preview API version could be regarded as same bar of stable APIs. I can help offline confirm with Azure teams on the latter and update here accordingly.
As for explanation on why I mentioned "technically safe" above, please refer to this comment I commented in another issue.
To ensure it's technically safe to have Terraform AzureRM support this feature, I may suggest either wait for this feature appear in the Azure service stable API version or the Azure service team could confirm that preview API version could be regarded as same bar of stable APIs. I can help offline confirm with Azure teams on the latter and update here accordingly.
Any news on this @mybayern1974?
@lsorber and all, we just got updates from the Azure Cosmos DB service team that this feature is still needed to be hosted in preview API and there is possibility there would be breaking changes related with this feature. When this feature could be stable is still under evaluation. The service team honors users' expectation to this feature in this provider, so evaluating the timeline of this feature being in stable API is one of their priorities though there is not a timeline explicitly shared now. With all above, my previous comment still applies. Furthermore, I've shared this GH issue with the service team so let's see whether contacts from the service team could share more details here if there are.
+1
+1
+1
+1
+1
+1
+1
Any update on this feature ? vCore is not preview anymore in Cosmos.
Any update on this feature?
This MR has been merged and "Azure Cosmos DB for MongoDB vCore" is no longer listed in the latest preview . mybayern1974
Hi @igabi, thanks for the updates. The mongoCluster.json
has indeed been removed from the latest preview, however, I assume that the mongoCluster.json
was just moved to another folder, which is still in preview. Also, I did not find mongoCluster.json
available in any stable API version. Please feel free let us know if you find it in a stable API version, thanks.
Hello, any update on this feature?
bump for feature.
This makes me very upset. vcore not enabled and the RU latest supported is v6
@saulfm08 , as well as to all here who expect this feature, with understanding your expectation, I however suggest or to say share transparency that the feature expectation is not at Terraform right now, instead, at the upstream service (API). Per commented above as here and here in this thread, this feature is not presented in a stable API version (per our latest observation, or anyone please correct me if you observe this feature appear in any stable service API version) but only a preview version, and there is a risk for Terraform to support preview features (reason has also been provided here). Furthermore, worth to mention, in one of my previous ticket filed to the target service team, they indicated it's possible the current preview API hosting this expected feature may introduce breaking change from their next stable API versions, if that happened, users who would have felt comfortable to get this feature in TF consuming the preview API version is possible to run into trouble when TF would have found TF cannot smoothly consume the next stable API version, which could include more wanted features by users, for that new API would be not backward compatible.
With above, I would suggest people who expect this feature in TF to file a ticket to target service team to consult their stable API release timeline (indeed, I did that recently with getting a response that it would come out soon though no concrete ETA provided)
I just came across this in case it helps anyone. However, I suppose it is still subject to the potential breaking API changes issue being discussed above.
Full support for Terraform is targetted for the second half of 2024.
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/quickstart-terraform