diff --git a/third_party/terraform/utils/batcher.go b/third_party/terraform/utils/batcher.go index caa6b45958ab..9f1a0ecdcb9e 100644 --- a/third_party/terraform/utils/batcher.go +++ b/third_party/terraform/utils/batcher.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/errwrap" ) -const defaultBatchSendIntervalSec = 10 +const defaultBatchSendIntervalSec = 3 // RequestBatcher is a global batcher object that keeps track of // existing batches. diff --git a/third_party/terraform/website/docs/guides/provider_reference.html.markdown b/third_party/terraform/website/docs/guides/provider_reference.html.markdown index 35ef8546b2e2..b6de0b0b4e2b 100644 --- a/third_party/terraform/website/docs/guides/provider_reference.html.markdown +++ b/third_party/terraform/website/docs/guides/provider_reference.html.markdown @@ -110,7 +110,8 @@ Values are expected to include the version of the service, such as `https://www.googleapis.com/compute/v1/`. * `batching` - (Optional) This block controls batching GCP calls for groups of specific resource types. Structure is documented below. -~>**NOTE**: Batching is not implemented for the majority or resources/request types and is bounded by the core [`-parallelism`](https://www.terraform.io/docs/commands/apply.html#parallelism-n) flag. Adding or changing this config likely won't affect a Terraform run at all unless the user is creating enough of a particular type of resource to run into quota issues. +~>**NOTE**: Batching is not implemented for the majority or resources/request types and is bounded by two values. If you are running into issues with slow batches +resources, you may need to adjust one or both of 1) the core [`-parallelism`](https://www.terraform.io/docs/commands/apply.html#parallelism-n) flag, which controls how many concurrent resources are being operated on and 2) `send_after`, the time interval after which a batch is sent. * `request_timeout` - (Optional) A duration string controlling the amount of time the provider should wait for a single HTTP request. This will not adjust the @@ -120,7 +121,8 @@ timeout blocks for that. The `batching` fields supports: * `send_after` - (Optional) A duration string representing the amount of time -after which a request should be sent. Defaults to 10s. +after which a request should be sent. Defaults to 3s. Note that if you increase +`parallelism` you should also increase this value. * `enable_batching` - (Optional) Defaults to true. If false, disables batching so requests that have batching capabilities are instead is sent one by one.