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
azurerm_cosmosdb_account.dba-fca: Refreshing state... [id=/subscriptions/*****/resou╷
│ Error: capability EnableMongo must be enabled if MongoDBv3.4 is also enabled
│
│ with azurerm_cosmosdb_account.dba-fca,
│ on main.tf line 35, in resource "azurerm_cosmosdb_account" "dba-fca":
│ 35: resource "azurerm_cosmosdb_account" "dba-fca" {
Panic Output
Expected Behaviour
This was running fine but suddenly started giving this issue.
Actual Behaviour
Steps to Reproduce
terraform apply
Important Factoids
If I add the capability EnableMongo on terraform it says it will destroy cosmoDB account which we cant.
If I try to update capability via azure cli we get below
az cosmosdb update --capabilities EnableMongo --name cosmosdba-test-dg-tbd --resource-group rg-fca-we-dev
BadRequestError: Operation failed with status: 'BadRequest'. Details: "EnableMongo capability is not allowed with kind=GlobalDocumentDB"
References
#0000
The text was updated successfully, but these errors were encountered:
@prateekmanasvi01, the property value enableMongo can't be set for the SQL API(kind: GlobalDocumentDB). The API is defined during the creation and cannot be modified afterwards.
As for the capability MongoDBv3.4, Azure also set enableMongo if it's enabled. Considering the property is forceNew, to prevent the database from being destroyed, we need to throw an error, you can refer to the PR#13757
hope it helps!
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform (and AzureRM Provider) Version
Terraform v1.0.6
on windows_amd64
Affected Resource(s)
azurerm_cosmosdb_account
Terraform Configuration Files
resource "azurerm_cosmosdb_account" "dba-fca" {
name = "cosmosdba-test-dg-tbd"
location = "westeurope"
resource_group_name = "rg-fca-we-dev"
offer_type = "Standard"
kind = "GlobalDocumentDB"
enable_free_tier = false
enable_multiple_write_locations = false
is_virtual_network_filter_enabled = true
analytical_storage_enabled = false
consistency_policy {
consistency_level = "Session"
}
capabilities {
name = "EnableAggregationPipeline"
}
capabilities {
name = "mongoEnableDocLevelTTL"
}
capabilities {
name = "MongoDBv3.4"
}
/*capabilities {
name = "EnableMongo"
} */
geo_location {
location = "westeurope"
failover_priority = 0
}
}
Debug Output
azurerm_cosmosdb_account.dba-fca: Refreshing state... [id=/subscriptions/*****/resou╷
│ Error: capability EnableMongo must be enabled if MongoDBv3.4 is also enabled
│
│ with azurerm_cosmosdb_account.dba-fca,
│ on main.tf line 35, in resource "azurerm_cosmosdb_account" "dba-fca":
│ 35: resource "azurerm_cosmosdb_account" "dba-fca" {
Panic Output
Expected Behaviour
This was running fine but suddenly started giving this issue.
Actual Behaviour
Steps to Reproduce
terraform apply
Important Factoids
If I add the capability EnableMongo on terraform it says it will destroy cosmoDB account which we cant.
If I try to update capability via azure cli we get below
References
The text was updated successfully, but these errors were encountered: