From 2ac00203803749055b3b60fcc6d959cf12954188 Mon Sep 17 00:00:00 2001 From: Andrey Nikishaev Date: Tue, 22 Sep 2020 00:55:16 +0300 Subject: [PATCH] azurerm_cosmosdb_account - support the `Serverless` value for the `capabilities` property (#8533) --- azurerm/internal/services/cosmos/cosmosdb_account_resource.go | 1 + .../services/cosmos/tests/cosmosdb_account_resource_test.go | 4 ++++ website/docs/r/cosmosdb_account.html.markdown | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/azurerm/internal/services/cosmos/cosmosdb_account_resource.go b/azurerm/internal/services/cosmos/cosmosdb_account_resource.go index 1b067231344e..d9e6ace8bda7 100644 --- a/azurerm/internal/services/cosmos/cosmosdb_account_resource.go +++ b/azurerm/internal/services/cosmos/cosmosdb_account_resource.go @@ -203,6 +203,7 @@ func resourceArmCosmosDbAccount() *schema.Resource { "EnableCassandra", "EnableGremlin", "EnableTable", + "EnableServerless", "EnableMongo", "MongoDBv3.4", "mongoEnableDocLevelTTL", diff --git a/azurerm/internal/services/cosmos/tests/cosmosdb_account_resource_test.go b/azurerm/internal/services/cosmos/tests/cosmosdb_account_resource_test.go index 0959d520f5b5..1e2cdaca5a55 100644 --- a/azurerm/internal/services/cosmos/tests/cosmosdb_account_resource_test.go +++ b/azurerm/internal/services/cosmos/tests/cosmosdb_account_resource_test.go @@ -264,6 +264,10 @@ func TestAccAzureRMCosmosDBAccount_capabilities_EnableTable(t *testing.T) { testAccAzureRMCosmosDBAccount_capabilitiesWith(t, documentdb.GlobalDocumentDB, []string{"EnableTable"}) } +func TestAccAzureRMCosmosDBAccount_capabilities_EnableServerless(t *testing.T) { + testAccAzureRMCosmosDBAccount_capabilitiesWith(t, documentdb.GlobalDocumentDB, []string{"EnableServerless"}) +} + func TestAccAzureRMCosmosDBAccount_capabilities_EnableMongo(t *testing.T) { testAccAzureRMCosmosDBAccount_capabilitiesWith(t, documentdb.MongoDB, []string{"EnableMongo"}) } diff --git a/website/docs/r/cosmosdb_account.html.markdown b/website/docs/r/cosmosdb_account.html.markdown index f7fc289e52ae..55400042bd34 100644 --- a/website/docs/r/cosmosdb_account.html.markdown +++ b/website/docs/r/cosmosdb_account.html.markdown @@ -89,7 +89,7 @@ The following arguments are supported: * `enable_automatic_failover` - (Optional) Enable automatic fail over for this Cosmos DB account. -* `capabilities` - (Optional) The capabilities which should be enabled for this Cosmos DB account. Possible values are `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`, `EnableTable`, `MongoDBv3.4`, and `mongoEnableDocLevelTTL`. +* `capabilities` - (Optional) The capabilities which should be enabled for this Cosmos DB account. Possible values are `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`, `EnableTable`, `MongoDBv3.4`, `EnableServerless`, and `mongoEnableDocLevelTTL`. * `is_virtual_network_filter_enabled` - (Optional) Enables virtual network filtering for this Cosmos DB account. @@ -113,7 +113,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 `AllowSelfServeUpgradeToMongo36`, DisableRateLimitingResponses`, `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`,`EnableMongo`, `EnableTable`, `MongoDBv3.4` and `mongoEnableDocLevelTTL`. +* `name` - (Required) The capability to enable - Possible values are `AllowSelfServeUpgradeToMongo36`, DisableRateLimitingResponses`, `EnableAggregationPipeline`, `EnableCassandra`, `EnableGremlin`,`EnableMongo`, `EnableTable`, `EnableServerless`, `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`.