Skip to content

Commit

Permalink
adding #9050
Browse files Browse the repository at this point in the history
* Remove `cosmosdb_sql_storage_container` autoscale upper cap

MSFT support can scale accounts and containers to the skies (largest
we've heard was around 30M RUs), so capping this in terraform breaks
custom accounts and containers scaled to large ~~wallets~~ volumes.

* Fix tests

* rebase and added limit test case back in

* add note to affected resource docs

Co-authored-by: jackofallops <ste@hashicorp.com>
  • Loading branch information
favoretti and jackofallops authored Nov 16, 2020
1 parent f26afa3 commit 0d20fb3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
5 changes: 0 additions & 5 deletions azurerm/helpers/validate/cosmos.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ func CosmosMaxThroughput(i interface{}, k string) (warnings []string, errors []e
"%s must be a minimum of 4000", k))
}

if v > 1000000 {
errors = append(errors, fmt.Errorf(
"%s must be a maximum of 1000000", k))
}

if v%1000 != 0 {
errors = append(errors, fmt.Errorf(
"%q must be set in increments of 1000", k))
Expand Down
2 changes: 1 addition & 1 deletion azurerm/helpers/validate/cosmos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestCosmosMaxThroughput(t *testing.T) {
},
{
Value: 1100000,
Errors: 1,
Errors: 0,
},
{
Value: "400",
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cosmosdb_cassandra_keyspace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ The following arguments are supported:

* `throughput` - (Optional) The throughput of Cassandra KeySpace (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support

* `autoscale_settings` - (Optional) An `autoscale_settings` block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** Switching between autoscale and manual throughput is not supported via Terraform and must be completed via the Azure Portal and refreshed.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cosmosdb_gremlin_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The following arguments are supported:

* `throughput` - (Optional) The throughput of the Gremlin database (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support

* `autoscale_settings` - (Optional) An `autoscale_settings` block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** Switching between autoscale and manual throughput is not supported via Terraform and must be completed via the Azure Portal and refreshed.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cosmosdb_mongo_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The following arguments are supported:

* `throughput` - (Optional) The throughput of the MongoDB database (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support.

* `autoscale_settings` - (Optional) An `autoscale_settings` block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** Switching between autoscale and manual throughput is not supported via Terraform and must be completed via the Azure Portal and refreshed.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cosmosdb_sql_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The following arguments are supported:

* `throughput` - (Optional) The throughput of SQL database (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support

* `autoscale_settings` - (Optional) An `autoscale_settings` block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** Switching between autoscale and manual throughput is not supported via Terraform and must be completed via the Azure Portal and refreshed.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cosmosdb_table.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The following arguments are supported:

* `throughput` - (Optional) The throughput of Table (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support

* `autoscale_settings` - (Optional) An `autoscale_settings` block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply.

~> **Note:** Switching between autoscale and manual throughput is not supported via Terraform and must be completed via the Azure Portal and refreshed.
Expand Down

0 comments on commit 0d20fb3

Please sign in to comment.