From a3f26ccd12b62d4aacb72fd0816b831e3372ddd1 Mon Sep 17 00:00:00 2001 From: findkim Date: Fri, 14 Feb 2020 13:43:10 -0600 Subject: [PATCH] website/docs/commands: document TF_REGISTRY_DISCOVERY_RETRY --- registry/client.go | 2 ++ website/docs/commands/environment-variables.html.md | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/registry/client.go b/registry/client.go index dcbb0debb..a4a80e021 100644 --- a/registry/client.go +++ b/registry/client.go @@ -368,6 +368,8 @@ func (c *Client) TerraformProviderLocation(provider *regsrc.TerraformProvider, v return &loc, nil } +// configureDiscoveryRetry configures the number of retries the registry client +// will attempt for requests with retryable errors, like 502 status codes func configureDiscoveryRetry() { discoveryRetry = defaultRetry diff --git a/website/docs/commands/environment-variables.html.md b/website/docs/commands/environment-variables.html.md index c163dc625..0a79aa9d6 100644 --- a/website/docs/commands/environment-variables.html.md +++ b/website/docs/commands/environment-variables.html.md @@ -114,6 +114,12 @@ exact output differences can change between minor Terraform versions. For more details see [Running Terraform in Automation](https://learn.hashicorp.com/terraform/development/running-terraform-in-automation). +## TF_REGISTRY_DISCOVERY_RETRY + +Set `TF_REGISTRY_DISCOVERY_RETRY` to configure the max number of request retries +the remote registry client will attempt for client connection errors or +500-range responses that are safe to retry. + ## TF_CLI_CONFIG_FILE The location of the [Terraform CLI configuration file](/docs/commands/cli-config.html).