Hello community,

here is the log from the commit of package terraform for openSUSE:Factory 
checked in at 2020-03-11 18:47:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/terraform (Old)
 and      /work/SRC/openSUSE:Factory/.terraform.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "terraform"

Wed Mar 11 18:47:06 2020 rev:18 rq:783095 version:0.12.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/terraform/terraform.changes      2020-02-24 
15:53:55.043673746 +0100
+++ /work/SRC/openSUSE:Factory/.terraform.new.3160/terraform.changes    
2020-03-11 18:50:04.991533683 +0100
@@ -1,0 +2,14 @@
+Fri Mar  6 11:01:48 UTC 2020 - Petr Cervinka <p...@cervinka.net>
+
+- Update to 0.12.23
+  BUG FIXES:
+   * cli: Fix wrong version returned by `terraform version`
+- Update to 0.12.22
+  ENHANCEMENTS:
+   * registry: Add configurable retries for module and provider discovery 
requests to the remote registry 
([#24260](https://github.com/hashicorp/terraform/pull/24260))
+   * registry: Add configurable request timeout for the remote registry client 
([#24259](https://github.com/hashicorp/terraform/pull/24259))
+  BUG FIXES:
+   * cli: Fix terraform state mv to correctly set the resource each mode based 
on the target address 
([#24254](https://github.com/hashicorp/terraform/issues/24254))
+   * cli: The `terraform plan` command (and the implied plan run by `terraform 
apply` with no arguments) will now print any warnings that were generated even 
if there are no changes to be made. 
([#24095](https://github.com/hashicorp/terraform/issues/24095))
+
+-------------------------------------------------------------------

Old:
----
  terraform-0.12.21.obscpio
  terraform-0.12.21.tar.xz

New:
----
  terraform-0.12.23.obscpio
  terraform-0.12.23.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ terraform.spec ++++++
--- /var/tmp/diff_new_pack.dMOxhU/_old  2020-03-11 18:50:06.635534418 +0100
+++ /var/tmp/diff_new_pack.dMOxhU/_new  2020-03-11 18:50:06.635534418 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           terraform
-Version:        0.12.21
+Version:        0.12.23
 Release:        0
 Summary:        Tool for building infrastructure safely and efficiently
 License:        MPL-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.dMOxhU/_old  2020-03-11 18:50:06.683534439 +0100
+++ /var/tmp/diff_new_pack.dMOxhU/_new  2020-03-11 18:50:06.683534439 +0100
@@ -3,8 +3,8 @@
     <param name="url">https://github.com/hashicorp/terraform.git</param>
     <param name="scm">git</param>
     <param name="filename">terraform</param>
-    <param name="versionformat">0.12.21</param>
-    <param name="revision">v0.12.21</param>
+    <param name="versionformat">0.12.23</param>
+    <param name="revision">v0.12.23</param>
     <param name="exclude">.git</param>
   </service>
   <service name="tar" mode="disabled"/>

++++++ terraform-0.12.21.obscpio -> terraform-0.12.23.obscpio ++++++
/work/SRC/openSUSE:Factory/terraform/terraform-0.12.21.obscpio 
/work/SRC/openSUSE:Factory/.terraform.new.3160/terraform-0.12.23.obscpio 
differ: char 49, line 1

++++++ terraform-0.12.21.tar.xz -> terraform-0.12.23.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/CHANGELOG.md 
new/terraform-0.12.23/CHANGELOG.md
--- old/terraform-0.12.21/CHANGELOG.md  2020-02-19 19:00:12.000000000 +0100
+++ new/terraform-0.12.23/CHANGELOG.md  2020-03-05 21:56:10.000000000 +0100
@@ -1,3 +1,15 @@
+## 0.12.23 (March 05, 2020)
+## 0.12.22 (March 05, 2020)
+
+ENHANCEMENTS:
+* registry: Add configurable retries for module and provider discovery 
requests to the remote registry 
([#24260](https://github.com/hashicorp/terraform/pull/24260))
+* registry: Add configurable request timeout for the remote registry client 
([#24259](https://github.com/hashicorp/terraform/pull/24259))
+
+BUG FIXES:
+
+* cli: Fix terraform state mv to correctly set the resource each mode based on 
the target address 
([#24254](https://github.com/hashicorp/terraform/issues/24254))
+* cli: The `terraform plan` command (and the implied plan run by `terraform 
apply` with no arguments) will now print any warnings that were generated even 
if there are no changes to be made. 
([#24095](https://github.com/hashicorp/terraform/issues/24095))
+
 ## 0.12.21 (February 19, 2020)
 
 NEW FEATURES:
@@ -26,6 +38,7 @@
 * command/show: Fix an issue with show and aliased providers 
([#23848](https://github.com/hashicorp/terraform/issues/23848))
 * core: Always clean up empty resources before empty modules 
([#23822](https://github.com/hashicorp/terraform/issues/23822))
 * internal/modsdir/manifest: Fix CLI issue with Windows machines 
([#23865](https://github.com/hashicorp/terraform/issues/23865))
+* backend: Variable values are no longer output to the console when variables 
are undeclared ([#23293](https://github.com/hashicorp/terraform/issues/23293))
 
 EXPERIMENTS:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/backend/local/backend_plan.go 
new/terraform-0.12.23/backend/local/backend_plan.go
--- old/terraform-0.12.21/backend/local/backend_plan.go 2020-02-19 
19:00:12.000000000 +0100
+++ new/terraform-0.12.23/backend/local/backend_plan.go 2020-03-05 
21:56:10.000000000 +0100
@@ -162,6 +162,8 @@
 
                if plan.Changes.Empty() {
                        b.CLI.Output("\n" + 
b.Colorize().Color(strings.TrimSpace(planNoChanges)))
+                       // Even if there are no changes, there still could be 
some warnings
+                       b.ShowDiagnostics(diags)
                        return
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/command/state_mv.go 
new/terraform-0.12.23/command/state_mv.go
--- old/terraform-0.12.21/command/state_mv.go   2020-02-19 19:00:12.000000000 
+0100
+++ new/terraform-0.12.23/command/state_mv.go   2020-03-05 21:56:10.000000000 
+0100
@@ -280,31 +280,30 @@
                                fromResourceAddr := 
addrFrom.ContainingResource()
                                fromResource := 
ssFrom.Resource(fromResourceAddr)
                                fromProviderAddr := fromResource.ProviderConfig
-                               fromEachMode := fromResource.EachMode
                                ssFrom.ForgetResourceInstanceAll(addrFrom)
                                ssFrom.RemoveResourceIfEmpty(fromResourceAddr)
 
+                               // since this is moving an instance, we can 
infer the target
+                               // mode from the address.
+                               toEachMode := 
eachModeForInstanceKey(addrTo.Resource.Key)
+
                                rs := 
stateTo.Resource(addrTo.ContainingResource())
                                if rs == nil {
                                        // If we're moving to an address 
without an index then that
                                        // suggests the user's intent is to 
establish both the
                                        // resource and the instance at the 
same time (since the
                                        // address covers both). If there's an 
index in the
-                                       // target then allow creating the new 
instance here,
-                                       // inferring the mode from how the new 
address was parsed.
-                                       if addrTo.Resource.Key != addrs.NoKey {
-                                               fromEachMode = 
eachModeForInstanceKey(addrTo.Resource.Key)
-                                       }
-
+                                       // target then allow creating the new 
instance here.
                                        resourceAddr := 
addrTo.ContainingResource()
                                        stateTo.SyncWrapper().SetResourceMeta(
                                                resourceAddr,
-                                               fromEachMode,
+                                               toEachMode,
                                                fromProviderAddr, // in this 
case, we bring the provider along as if we were moving the whole resource
                                        )
                                        rs = stateTo.Resource(resourceAddr)
                                }
 
+                               rs.EachMode = toEachMode
                                rs.Instances[addrTo.Resource.Key] = is
                        }
                default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/command/state_mv_test.go 
new/terraform-0.12.23/command/state_mv_test.go
--- old/terraform-0.12.21/command/state_mv_test.go      2020-02-19 
19:00:12.000000000 +0100
+++ new/terraform-0.12.23/command/state_mv_test.go      2020-03-05 
21:56:10.000000000 +0100
@@ -62,7 +62,7 @@
                "test_instance.bar",
        }
        if code := c.Run(args); code != 0 {
-               t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
+               t.Fatalf("return code: %d\n\n%s", code, ui.ErrorWriter.String())
        }
 
        // Test it is correct
@@ -74,6 +74,70 @@
                t.Fatalf("bad: %#v", backups)
        }
        testStateOutput(t, backups[0], testStateMvOutputOriginal)
+
+       // Change the single instance to a counted instance
+       args = []string{
+               "-state", statePath,
+               "test_instance.bar",
+               "test_instance.bar[0]",
+       }
+       if code := c.Run(args); code != 0 {
+               t.Fatalf("return code: %d\n\n%s", code, ui.ErrorWriter.String())
+       }
+
+       // extract the resource and verify the mode
+       s := testStateRead(t, statePath)
+       addr, diags := addrs.ParseAbsResourceStr("test_instance.bar")
+       if diags.HasErrors() {
+               t.Fatal(diags.Err())
+       }
+       i := s.Resource(addr)
+       if i.EachMode != states.EachList {
+               t.Fatalf("expected each mode List, got %s", i.EachMode)
+       }
+
+       // change from list to map
+       args = []string{
+               "-state", statePath,
+               "test_instance.bar[0]",
+               "test_instance.bar[\"baz\"]",
+       }
+       if code := c.Run(args); code != 0 {
+               t.Fatalf("return code: %d\n\n%s", code, ui.ErrorWriter.String())
+       }
+
+       // extract the resource and verify the mode
+       s = testStateRead(t, statePath)
+       addr, diags = addrs.ParseAbsResourceStr("test_instance.bar")
+       if diags.HasErrors() {
+               t.Fatal(diags.Err())
+       }
+       i = s.Resource(addr)
+       if i.EachMode != states.EachMap {
+               t.Fatalf("expected each mode Map, got %s", i.EachMode)
+       }
+
+       // change from from map back to single
+       args = []string{
+               "-state", statePath,
+               "test_instance.bar[\"baz\"]",
+               "test_instance.bar",
+       }
+       if code := c.Run(args); code != 0 {
+               t.Fatalf("return code: %d\n\n%s", code, ui.ErrorWriter.String())
+       }
+
+       // extract the resource and verify the mode
+       s = testStateRead(t, statePath)
+       addr, diags = addrs.ParseAbsResourceStr("test_instance.bar")
+       if diags.HasErrors() {
+               t.Fatal(diags.Err())
+       }
+       i = s.Resource(addr)
+       if i.EachMode != states.NoEach {
+               t.Fatalf("expected each mode NoEach, got %s", i.EachMode)
+       }
+
 }
 
 func TestStateMv_resourceToInstance(t *testing.T) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/internal/initwd/module_install.go 
new/terraform-0.12.23/internal/initwd/module_install.go
--- old/terraform-0.12.21/internal/initwd/module_install.go     2020-02-19 
19:00:12.000000000 +0100
+++ new/terraform-0.12.23/internal/initwd/module_install.go     2020-03-05 
21:56:10.000000000 +0100
@@ -438,8 +438,8 @@
                        log.Printf("[ERROR] %s from %s %s: %s", key, addr, 
latestMatch, err)
                        diags = diags.Append(tfdiags.Sourceless(
                                tfdiags.Error,
-                               "Invalid response from remote module registry",
-                               fmt.Sprintf("The remote registry at %s failed 
to return a download URL for %s %s.", hostname, addr, latestMatch),
+                               "Error accessing remote module registry",
+                               fmt.Sprintf("Failed to retrieve a download URL 
for %s %s from %s: %s", addr, latestMatch, hostname, err),
                        ))
                        return nil, nil, diags
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/registry/client.go 
new/terraform-0.12.23/registry/client.go
--- old/terraform-0.12.21/registry/client.go    2020-02-19 19:00:12.000000000 
+0100
+++ new/terraform-0.12.23/registry/client.go    2020-03-05 21:56:10.000000000 
+0100
@@ -7,12 +7,16 @@
        "log"
        "net/http"
        "net/url"
+       "os"
        "path"
+       "strconv"
        "strings"
        "time"
 
+       "github.com/hashicorp/go-retryablehttp"
        "github.com/hashicorp/terraform-svchost"
        "github.com/hashicorp/terraform-svchost/disco"
+       "github.com/hashicorp/terraform/helper/logging"
        "github.com/hashicorp/terraform/httpclient"
        "github.com/hashicorp/terraform/registry/regsrc"
        "github.com/hashicorp/terraform/registry/response"
@@ -22,21 +26,49 @@
 const (
        xTerraformGet      = "X-Terraform-Get"
        xTerraformVersion  = "X-Terraform-Version"
-       requestTimeout     = 10 * time.Second
        modulesServiceID   = "modules.v1"
        providersServiceID = "providers.v1"
+
+       // registryDiscoveryRetryEnvName is the name of the environment 
variable that
+       // can be configured to customize number of retries for module and 
provider
+       // discovery requests with the remote registry.
+       registryDiscoveryRetryEnvName = "TF_REGISTRY_DISCOVERY_RETRY"
+       defaultRetry                  = 1
+
+       // registryClientTimeoutEnvName is the name of the environment variable 
that
+       // can be configured to customize the timeout duration (seconds) for 
module
+       // and provider discovery with the remote registry.
+       registryClientTimeoutEnvName = "TF_REGISTRY_CLIENT_TIMEOUT"
+
+       // defaultRequestTimeout is the default timeout duration for requests 
to the
+       // remote registry.
+       defaultRequestTimeout = 10 * time.Second
 )
 
-var tfVersion = version.String()
+var (
+       tfVersion = version.String()
+
+       discoveryRetry int
+       requestTimeout time.Duration
+)
+
+func init() {
+       configureDiscoveryRetry()
+       configureRequestTimeout()
+}
 
 // Client provides methods to query Terraform Registries.
 type Client struct {
        // this is the client to be used for all requests.
-       client *http.Client
+       client *retryablehttp.Client
 
        // services is a required *disco.Disco, which may have services and
        // credentials pre-loaded.
        services *disco.Disco
+
+       // retry is the number of retries the client will attempt for each 
request
+       // if it runs into a transient failure with the remote registry.
+       retry int
 }
 
 // NewClient returns a new initialized registry client.
@@ -49,13 +81,25 @@
                client = httpclient.New()
                client.Timeout = requestTimeout
        }
+       retryableClient := retryablehttp.NewClient()
+       retryableClient.HTTPClient = client
+       retryableClient.RetryMax = discoveryRetry
+       retryableClient.RequestLogHook = requestLogHook
+       retryableClient.ErrorHandler = maxRetryErrorHandler
+
+       logOutput, err := logging.LogOutput()
+       if err != nil {
+               log.Printf("[WARN] Failed to set up registry client logger, "+
+                       "continuing without client logging: %s", err)
+       }
+       retryableClient.Logger = log.New(logOutput, "", log.Flags())
 
-       services.Transport = client.Transport
+       services.Transport = retryableClient.HTTPClient.Transport
 
        services.SetUserAgent(httpclient.TerraformUserAgent(version.String()))
 
        return &Client{
-               client:   client,
+               client:   retryableClient,
                services: services,
        }
 }
@@ -93,12 +137,12 @@
 
        log.Printf("[DEBUG] fetching module versions from %q", service)
 
-       req, err := http.NewRequest("GET", service.String(), nil)
+       req, err := retryablehttp.NewRequest("GET", service.String(), nil)
        if err != nil {
                return nil, err
        }
 
-       c.addRequestCreds(host, req)
+       c.addRequestCreds(host, req.Request)
        req.Header.Set(xTerraformVersion, tfVersion)
 
        resp, err := c.client.Do(req)
@@ -170,12 +214,12 @@
 
        log.Printf("[DEBUG] looking up module location from %q", download)
 
-       req, err := http.NewRequest("GET", download.String(), nil)
+       req, err := retryablehttp.NewRequest("GET", download.String(), nil)
        if err != nil {
                return "", err
        }
 
-       c.addRequestCreds(host, req)
+       c.addRequestCreds(host, req.Request)
        req.Header.Set(xTerraformVersion, tfVersion)
 
        resp, err := c.client.Do(req)
@@ -250,12 +294,12 @@
 
        log.Printf("[DEBUG] fetching provider versions from %q", service)
 
-       req, err := http.NewRequest("GET", service.String(), nil)
+       req, err := retryablehttp.NewRequest("GET", service.String(), nil)
        if err != nil {
                return nil, err
        }
 
-       c.addRequestCreds(host, req)
+       c.addRequestCreds(host, req.Request)
        req.Header.Set(xTerraformVersion, tfVersion)
 
        resp, err := c.client.Do(req)
@@ -310,12 +354,12 @@
 
        log.Printf("[DEBUG] fetching provider location from %q", service)
 
-       req, err := http.NewRequest("GET", service.String(), nil)
+       req, err := retryablehttp.NewRequest("GET", service.String(), nil)
        if err != nil {
                return nil, err
        }
 
-       c.addRequestCreds(host, req)
+       c.addRequestCreds(host, req.Request)
        req.Header.Set(xTerraformVersion, tfVersion)
 
        resp, err := c.client.Do(req)
@@ -343,3 +387,52 @@
 
        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
+
+       if v := os.Getenv(registryDiscoveryRetryEnvName); v != "" {
+               retry, err := strconv.Atoi(v)
+               if err == nil && retry > 0 {
+                       discoveryRetry = retry
+               }
+       }
+}
+
+func requestLogHook(logger retryablehttp.Logger, req *http.Request, i int) {
+       if i > 0 {
+               logger.Printf("[INFO] Previous request to the remote registry 
failed, attempting retry.")
+       }
+}
+
+func maxRetryErrorHandler(resp *http.Response, err error, numTries int) 
(*http.Response, error) {
+       // Close the body per library instructions
+       if resp != nil {
+               resp.Body.Close()
+       }
+
+       var errMsg string
+       if err != nil {
+               errMsg = fmt.Sprintf(" %s", err)
+       }
+       if numTries > 1 {
+               return resp, fmt.Errorf("the request failed after %d attempts, 
please try again later: %d%s",
+                       numTries, resp.StatusCode, errMsg)
+       }
+       return resp, fmt.Errorf("the request failed, please try again later: 
%d%s", resp.StatusCode, errMsg)
+}
+
+// configureRequestTimeout configures the registry client request timeout from
+// environment variables
+func configureRequestTimeout() {
+       requestTimeout = defaultRequestTimeout
+
+       if v := os.Getenv(registryClientTimeoutEnvName); v != "" {
+               timeout, err := strconv.Atoi(v)
+               if err == nil && timeout > 0 {
+                       requestTimeout = time.Duration(timeout) * time.Second
+               }
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/registry/client_test.go 
new/terraform-0.12.23/registry/client_test.go
--- old/terraform-0.12.21/registry/client_test.go       2020-02-19 
19:00:12.000000000 +0100
+++ new/terraform-0.12.23/registry/client_test.go       2020-03-05 
21:56:10.000000000 +0100
@@ -1,10 +1,13 @@
 package registry
 
 import (
+       "context"
        "fmt"
+       "net/http"
        "os"
        "strings"
        "testing"
+       "time"
 
        version "github.com/hashicorp/go-version"
        "github.com/hashicorp/terraform-svchost/disco"
@@ -14,6 +17,77 @@
        tfversion "github.com/hashicorp/terraform/version"
 )
 
+func TestConfigureDiscoveryRetry(t *testing.T) {
+       t.Run("default retry", func(t *testing.T) {
+               if discoveryRetry != defaultRetry {
+                       t.Fatalf("expected retry %q, got %q", defaultRetry, 
discoveryRetry)
+               }
+
+               rc := NewClient(nil, nil)
+               if rc.client.RetryMax != defaultRetry {
+                       t.Fatalf("expected client retry %q, got %q",
+                               defaultRetry, rc.client.RetryMax)
+               }
+       })
+
+       t.Run("configured retry", func(t *testing.T) {
+               defer func(retryEnv string) {
+                       os.Setenv(registryDiscoveryRetryEnvName, retryEnv)
+                       discoveryRetry = defaultRetry
+               }(os.Getenv(registryDiscoveryRetryEnvName))
+               os.Setenv(registryDiscoveryRetryEnvName, "2")
+
+               configureDiscoveryRetry()
+               expected := 2
+               if discoveryRetry != expected {
+                       t.Fatalf("expected retry %q, got %q",
+                               expected, discoveryRetry)
+               }
+
+               rc := NewClient(nil, nil)
+               if rc.client.RetryMax != expected {
+                       t.Fatalf("expected client retry %q, got %q",
+                               expected, rc.client.RetryMax)
+               }
+       })
+}
+
+func TestConfigureRegistryClientTimeout(t *testing.T) {
+       t.Run("default timeout", func(t *testing.T) {
+               if requestTimeout != defaultRequestTimeout {
+                       t.Fatalf("expected timeout %q, got %q",
+                               defaultRequestTimeout.String(), 
requestTimeout.String())
+               }
+
+               rc := NewClient(nil, nil)
+               if rc.client.HTTPClient.Timeout != defaultRequestTimeout {
+                       t.Fatalf("expected client timeout %q, got %q",
+                               defaultRequestTimeout.String(), 
rc.client.HTTPClient.Timeout.String())
+               }
+       })
+
+       t.Run("configured timeout", func(t *testing.T) {
+               defer func(timeoutEnv string) {
+                       os.Setenv(registryClientTimeoutEnvName, timeoutEnv)
+                       requestTimeout = defaultRequestTimeout
+               }(os.Getenv(registryClientTimeoutEnvName))
+               os.Setenv(registryClientTimeoutEnvName, "20")
+
+               configureRequestTimeout()
+               expected := 20 * time.Second
+               if requestTimeout != expected {
+                       t.Fatalf("expected timeout %q, got %q",
+                               expected, requestTimeout.String())
+               }
+
+               rc := NewClient(nil, nil)
+               if rc.client.HTTPClient.Timeout != expected {
+                       t.Fatalf("expected client timeout %q, got %q",
+                               expected, rc.client.HTTPClient.Timeout.String())
+               }
+       })
+}
+
 func TestLookupModuleVersions(t *testing.T) {
        server := test.Registry()
        defer server.Close()
@@ -179,20 +253,31 @@
        }
 }
 
-// the error should reference the config source exatly, not the discovered 
path.
+// the error should reference the config source exactly, not the discovered 
path.
 func TestLookupLookupModuleError(t *testing.T) {
        server := test.Registry()
        defer server.Close()
 
        client := NewClient(test.Disco(server), nil)
 
-       // this should not be found in teh registry
+       // this should not be found in the registry
        src := "bad/local/path"
        mod, err := regsrc.ParseModuleSource(src)
        if err != nil {
                t.Fatal(err)
        }
 
+       // Instrument CheckRetry to make sure 404s are not retried
+       retries := 0
+       oldCheck := client.client.CheckRetry
+       client.client.CheckRetry = func(ctx context.Context, resp 
*http.Response, err error) (bool, error) {
+               if retries > 0 {
+                       t.Fatal("retried after module not found")
+               }
+               retries++
+               return oldCheck(ctx, resp, err)
+       }
+
        _, err = client.ModuleLocation(mod, "0.2.0")
        if err == nil {
                t.Fatal("expected error")
@@ -204,6 +289,31 @@
        }
 }
 
+func TestLookupModuleRetryError(t *testing.T) {
+       server := test.RegistryRetryableErrorsServer()
+       defer server.Close()
+
+       client := NewClient(test.Disco(server), nil)
+
+       src := "example.com/test-versions/name/provider"
+       modsrc, err := regsrc.ParseModuleSource(src)
+       if err != nil {
+               t.Fatal(err)
+       }
+       resp, err := client.ModuleVersions(modsrc)
+       if err == nil {
+               t.Fatal("expected requests to exceed retry", err)
+       }
+       if resp != nil {
+               t.Fatal("unexpected response", *resp)
+       }
+
+       // verify maxRetryErrorHandler handler returned the error
+       if !strings.Contains(err.Error(), "the request failed after 2 attempts, 
please try again later") {
+               t.Fatal("unexpected error, got:", err)
+       }
+}
+
 func TestLookupProviderVersions(t *testing.T) {
        server := test.Registry()
        defer server.Close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/registry/test/mock_registry.go 
new/terraform-0.12.23/registry/test/mock_registry.go
--- old/terraform-0.12.21/registry/test/mock_registry.go        2020-02-19 
19:00:12.000000000 +0100
+++ new/terraform-0.12.23/registry/test/mock_registry.go        2020-03-05 
21:56:10.000000000 +0100
@@ -363,3 +363,16 @@
 func Registry() *httptest.Server {
        return httptest.NewServer(mockRegHandler())
 }
+
+// RegistryRetryableErrorsServer returns an httptest server that mocks out the
+// registry API to return 502 errors.
+func RegistryRetryableErrorsServer() *httptest.Server {
+       mux := http.NewServeMux()
+       mux.HandleFunc("/v1/modules/", func(w http.ResponseWriter, r 
*http.Request) {
+               http.Error(w, "mocked server error", http.StatusBadGateway)
+       })
+       mux.HandleFunc("/v1/providers/", func(w http.ResponseWriter, r 
*http.Request) {
+               http.Error(w, "mocked server error", http.StatusBadGateway)
+       })
+       return httptest.NewServer(mux)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terraform-0.12.21/version/version.go 
new/terraform-0.12.23/version/version.go
--- old/terraform-0.12.21/version/version.go    2020-02-19 19:00:12.000000000 
+0100
+++ new/terraform-0.12.23/version/version.go    2020-03-05 21:56:10.000000000 
+0100
@@ -11,7 +11,7 @@
 )
 
 // The main version number that is being run at the moment.
-var Version = "0.12.21"
+var Version = "0.12.23"
 
 // A pre-release marker for the version. If this is "" (empty string)
 // then it means that it is a final release. Otherwise, this is a pre-release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/terraform-0.12.21/website/docs/commands/environment-variables.html.md 
new/terraform-0.12.23/website/docs/commands/environment-variables.html.md
--- old/terraform-0.12.21/website/docs/commands/environment-variables.html.md   
2020-02-19 19:00:12.000000000 +0100
+++ new/terraform-0.12.23/website/docs/commands/environment-variables.html.md   
2020-03-05 21:56:10.000000000 +0100
@@ -114,6 +114,20 @@
 
 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_REGISTRY_CLIENT_TIMEOUT
+
+The default client timeout for requests to the remote registry is 10s. 
`TF_REGISTRY_CLIENT_TIMEOUT` can be configured and increased during extraneous 
circumstances.
+
+```shell
+export TF_REGISTRY_CLIENT_TIMEOUT=15
+```
+
 ## TF_CLI_CONFIG_FILE
 
 The location of the [Terraform CLI configuration 
file](/docs/commands/cli-config.html).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/terraform-0.12.21/website/docs/providers/index.html.markdown 
new/terraform-0.12.23/website/docs/providers/index.html.markdown
--- old/terraform-0.12.21/website/docs/providers/index.html.markdown    
2020-02-19 19:00:12.000000000 +0100
+++ new/terraform-0.12.23/website/docs/providers/index.html.markdown    
2020-03-05 21:56:10.000000000 +0100
@@ -103,6 +103,7 @@
 - [Nutanix](/docs/providers/nutanix/index.html)
 - [1&1](/docs/providers/oneandone/index.html)
 - [Okta](/docs/providers/okta/index.html)
+- [Okta ASA](/docs/providers/oktaasa/index.html)
 - [OpenNebula](/docs/providers/opennebula/index.html)
 - [OpenStack](/docs/providers/openstack/index.html)
 - [OpenTelekomCloud](/docs/providers/opentelekomcloud/index.html)
@@ -118,6 +119,7 @@
 - [PowerDNS](/docs/providers/powerdns/index.html)
 - [ProfitBricks](/docs/providers/profitbricks/index.html)
 - [Pureport](/docs/providers/pureport/index.html)
+- [Quorum](/docs/providers/quorum/index.html)
 - [RabbitMQ](/docs/providers/rabbitmq/index.html)
 - [Rancher](/docs/providers/rancher/index.html)
 - [Rancher2](/docs/providers/rancher2/index.html)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/terraform-0.12.21/website/docs/providers/type/community-index.html.markdown 
new/terraform-0.12.23/website/docs/providers/type/community-index.html.markdown
--- 
old/terraform-0.12.21/website/docs/providers/type/community-index.html.markdown 
    2020-02-19 19:00:12.000000000 +0100
+++ 
new/terraform-0.12.23/website/docs/providers/type/community-index.html.markdown 
    2020-03-05 21:56:10.000000000 +0100
@@ -71,6 +71,7 @@
 - [ElephantSQL](https://github.com/ElephantSQL/terraform-provider-elephantsql)
 - [Enterprise Cloud](https://github.com/nttcom/terraform-provider-ecl)
 - [ESXI](https://github.com/josenk/terraform-provider-esxi)
+- [Flowdock](https://github.com/sirenfei/terraform-provider-flowdock)
 - [Foreman - wayfair](https://github.com/wayfair/terraform-provider-foreman)
 - [Foreman - 
HanseMerkur](https://github.com/HanseMerkur/terraform-provider-foreman)
 - [Gandi](https://github.com/tiramiseb/terraform-provider-gandi)
@@ -125,7 +126,7 @@
 - [Nelson](https://github.com/getnelson/terraform-provider-nelson)
 - [NetApp](https://github.com/miechus/terraform-provider-netapp)
 - [NSX-V](https://github.com/GSLabDev/terraform-provider-nsxv)
-- [Okta](/docs/providers/okta/index.html)
+- [Oktawave](https://github.com/oktawave-code/terraform-provider-oktawave)
 - [Online.net](https://github.com/src-d/terraform-provider-online)
 - [Open Day Light](https://github.com/GSLabDev/terraform-provider-odl)
 - [OpenAPI](https://github.com/dikhan/terraform-provider-openapi)
@@ -165,13 +166,14 @@
 - [Sumo Logic](https://github.com/SumoLogic/sumologic-terraform-provider)
 - [TeamCity](https://github.com/cvbarros/terraform-provider-teamcity)
 - [Telegram](https://github.com/yi-jiayu/terraform-provider-telegram)
+- [Time](https://github.com/bflad/terraform-provider-time)
 - [Transloadit](https://github.com/delphire/terraform-provider-transloadit)
 - [Trello](https://github.com/jtsaito/terraform-provider-trello)
 - [tumblr](https://github.com/rfiestas/terraform-provider-tumblr)
 - [Unifi](https://github.com/paultyng/terraform-provider-unifi)
 - [UpCloud](https://github.com/UpCloudLtd/terraform-provider-upcloud/)
 - [Updown.io](https://github.com/mvisonneau/terraform-provider-updown)
-- [Uptimerobot](https://github.com/SpamapS/terraform-provider-uptimerobot)
+- [Uptimerobot](https://github.com/louy/terraform-provider-uptimerobot)
 - [Vaulted](https://github.com/sumup-oss/terraform-provider-vaulted)
 - [Veeam](https://github.com/GSLabDev/terraform-provider-veeam)
 - [Venafi](https://github.com/Venafi/terraform-provider-venafi)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/terraform-0.12.21/website/docs/providers/type/infra-index.html.markdown 
new/terraform-0.12.23/website/docs/providers/type/infra-index.html.markdown
--- old/terraform-0.12.21/website/docs/providers/type/infra-index.html.markdown 
2020-02-19 19:00:12.000000000 +0100
+++ new/terraform-0.12.23/website/docs/providers/type/infra-index.html.markdown 
2020-03-05 21:56:10.000000000 +0100
@@ -26,6 +26,7 @@
 - [Mailgun](/docs/providers/mailgun/index.html)
 - [Nomad](/docs/providers/nomad/index.html)
 - [Okta](/docs/providers/okta/index.html)
+- [Okta ASA](/docs/providers/oktaasa/index.html)
 - [RabbitMQ](/docs/providers/rabbitmq/index.html)
 - [Rancher](/docs/providers/rancher/index.html)
 - [Rancher2](/docs/providers/rancher2/index.html)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/terraform-0.12.21/website/docs/providers/type/misc-index.html.markdown 
new/terraform-0.12.23/website/docs/providers/type/misc-index.html.markdown
--- old/terraform-0.12.21/website/docs/providers/type/misc-index.html.markdown  
2020-02-19 19:00:12.000000000 +0100
+++ new/terraform-0.12.23/website/docs/providers/type/misc-index.html.markdown  
2020-03-05 21:56:10.000000000 +0100
@@ -26,3 +26,5 @@
 - [Random](/docs/providers/random/index.html)
 - [Template](/docs/providers/template/index.html)
 - [TLS](/docs/providers/tls/index.html)
+- [Quorum](/docs/providers/quorum/index.html)
+

++++++ terraform.obsinfo ++++++
--- /var/tmp/diff_new_pack.dMOxhU/_old  2020-03-11 18:50:09.895535875 +0100
+++ /var/tmp/diff_new_pack.dMOxhU/_new  2020-03-11 18:50:09.895535875 +0100
@@ -1,5 +1,5 @@
 name: terraform
-version: 0.12.21
-mtime: 1582135212
-commit: 173530d89568c1183d357138a0b0ed7b326a5189
+version: 0.12.23
+mtime: 1583441770
+commit: 85024d3100126de36331c6982bfaac02cdab9e76
 


Reply via email to