From 1ecabe73089f5463da6a2103f065929e95f03f3f Mon Sep 17 00:00:00 2001 From: Dmytro Slupytskyi Date: Mon, 19 Mar 2018 18:41:36 +0100 Subject: [PATCH 1/3] increase max_staleness_prefix to 1 day --- azurerm/resource_arm_cosmos_db_account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/resource_arm_cosmos_db_account.go b/azurerm/resource_arm_cosmos_db_account.go index 17035b04bd7a..ac66fd4d3a0f 100644 --- a/azurerm/resource_arm_cosmos_db_account.go +++ b/azurerm/resource_arm_cosmos_db_account.go @@ -87,7 +87,7 @@ func resourceArmCosmosDBAccount() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 5, - ValidateFunc: validation.IntBetween(1, 100), + ValidateFunc: validation.IntBetween(1, 86400), }, "max_staleness_prefix": { From 1df612303586adc2f77b4f80ea1be24685fdfb1d Mon Sep 17 00:00:00 2001 From: Dmytro Slupytskyi Date: Mon, 19 Mar 2018 18:42:00 +0100 Subject: [PATCH 2/3] fix unknown key --- website/docs/r/cosmosdb_account.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/cosmosdb_account.html.markdown b/website/docs/r/cosmosdb_account.html.markdown index 38857755169e..df0e22db92cb 100644 --- a/website/docs/r/cosmosdb_account.html.markdown +++ b/website/docs/r/cosmosdb_account.html.markdown @@ -77,9 +77,9 @@ The following arguments are supported: * `consistency_level` - (Required) The Consistency Level to use for this CosmosDB Account - can be either `BoundedStaleness`, `Eventual`, `Session` or `Strong`. * `max_interval_in_seconds` - (Optional) When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 100. Defaults to `5`. Required when `consistency_level` is set to `BoundedStaleness`. -* `max_staleness` - (Optional) When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Defaults to `100`. Required when `consistency_level` is set to `BoundedStaleness`. +* `max_staleness_prefix` - (Optional) When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Defaults to `100`. Required when `consistency_level` is set to `BoundedStaleness`. -~> **Note**: `max_interval_in_seconds` and `max_staleness` can only be set to custom values when `consistency_level` is set to `BoundedStaleness` - otherwise they will return the default values shown above. +~> **Note**: `max_interval_in_seconds` and `max_staleness_prefix` can only be set to custom values when `consistency_level` is set to `BoundedStaleness` - otherwise they will return the default values shown above. `failover_policy` supports the following: From 06d0203bb873ebcd01f450a303653ed936e29480 Mon Sep 17 00:00:00 2001 From: kt Date: Mon, 19 Mar 2018 15:02:42 -0700 Subject: [PATCH 3/3] Small update to azurerm_cosmosdb_account documentation. --- website/docs/r/cosmosdb_account.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/cosmosdb_account.html.markdown b/website/docs/r/cosmosdb_account.html.markdown index df0e22db92cb..b038394858ad 100644 --- a/website/docs/r/cosmosdb_account.html.markdown +++ b/website/docs/r/cosmosdb_account.html.markdown @@ -76,7 +76,7 @@ The following arguments are supported: `consistency_policy` supports the following: * `consistency_level` - (Required) The Consistency Level to use for this CosmosDB Account - can be either `BoundedStaleness`, `Eventual`, `Session` or `Strong`. -* `max_interval_in_seconds` - (Optional) When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 100. Defaults to `5`. Required when `consistency_level` is set to `BoundedStaleness`. +* `max_interval_in_seconds` - (Optional) When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 86400 (1 day). Defaults to `5`. Required when `consistency_level` is set to `BoundedStaleness`. * `max_staleness_prefix` - (Optional) When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Defaults to `100`. Required when `consistency_level` is set to `BoundedStaleness`. ~> **Note**: `max_interval_in_seconds` and `max_staleness_prefix` can only be set to custom values when `consistency_level` is set to `BoundedStaleness` - otherwise they will return the default values shown above.