diff --git a/azurerm/internal/services/cosmos/resource_arm_cosmosdb_account.go b/azurerm/internal/services/cosmos/resource_arm_cosmosdb_account.go index 56c2f9032acc..23958afdb9f4 100644 --- a/azurerm/internal/services/cosmos/resource_arm_cosmosdb_account.go +++ b/azurerm/internal/services/cosmos/resource_arm_cosmosdb_account.go @@ -211,6 +211,7 @@ func resourceArmCosmosDbAccount() *schema.Resource { "EnableTable", "EnableGremlin", "EnableCassandra", + "EnableMongo", "EnableAggregationPipeline", "MongoDBv3.4", "mongoEnableDocLevelTTL", @@ -397,21 +398,6 @@ func resourceArmCosmosDbAccountCreate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error creating CosmosDB Account %q (Resource Group %q): %+v", name, resourceGroup, err) } - //for some reason capabilities doesn't always work on create, so lets patch it - //tracked: https://github.com/Azure/azure-sdk-for-go/issues/2864 - future, err := client.Patch(ctx, resourceGroup, name, documentdb.DatabaseAccountPatchParameters{ - DatabaseAccountPatchProperties: &documentdb.DatabaseAccountPatchProperties{ - Capabilities: account.Capabilities, - }, - }) - if err != nil { - return fmt.Errorf("Error Patching CosmosDB Account %q (Resource Group %q): %+v", name, resourceGroup, err) - } - - if err := future.WaitForCompletionRef(context.Background(), client.Client); err != nil { - return fmt.Errorf("Error waiting on patch future CosmosDB Account %q (Resource Group %q): %+v", name, resourceGroup, err) - } - id := resp.ID if id == nil { return fmt.Errorf("Cannot read CosmosDB Account '%s' (resource group %s) ID", name, resourceGroup) @@ -550,21 +536,6 @@ func resourceArmCosmosDbAccountUpdate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Cannot read CosmosDB Account '%s' (resource group %s) ID", name, resourceGroup) } - //for some reason capabilities doesn't always work on create, so lets patch it - //tracked: https://github.com/Azure/azure-sdk-for-go/issues/2864 - future, err := client.Patch(ctx, resourceGroup, name, documentdb.DatabaseAccountPatchParameters{ - DatabaseAccountPatchProperties: &documentdb.DatabaseAccountPatchProperties{ - Capabilities: account.Capabilities, - }, - }) - if err != nil { - return fmt.Errorf("Error Patching CosmosDB Account %q (Resource Group %q): %+v", name, resourceGroup, err) - } - - if err := future.WaitForCompletionRef(context.Background(), client.Client); err != nil { - return fmt.Errorf("Error waiting on patch future CosmosDB Account %q (Resource Group %q): %+v", name, resourceGroup, err) - } - d.SetId(*id) return resourceArmCosmosDbAccountRead(d, meta) diff --git a/website/docs/r/cosmosdb_account.html.markdown b/website/docs/r/cosmosdb_account.html.markdown index 85ee8399adcf..aca30bd3c382 100644 --- a/website/docs/r/cosmosdb_account.html.markdown +++ b/website/docs/r/cosmosdb_account.html.markdown @@ -100,7 +100,7 @@ The following arguments are supported: `capabilities` Configures the capabilities to enable for this Cosmos DB account: -* `name` - (Required) The capability to enable - Possible values are `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`, `EnableTable`, `MongoDBv3.4`, and `mongoEnableDocLevelTTL`. +* `name` - (Required) The capability to enable - Possible values are `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`,`EnableMongo`, `EnableTable`, `MongoDBv3.4`, and `mongoEnableDocLevelTTL`. **NOTE:** The `prefix` and `failover_priority` fields of a location cannot be changed for the location with a failover priority of `0`.