From 5300f85a796fbc5a492428a905e3900a5965ee87 Mon Sep 17 00:00:00 2001 From: Kristin Laemmert Date: Thu, 26 Sep 2019 10:08:29 -0400 Subject: [PATCH] backend/manta: fix panic when insecure_skip_tls_verify was not set The DefaultFunc for insecure_skip_tls_verify was sending an empty string instead of a bool. Fixes to default to `false`. --- backend/remote-state/manta/backend.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/remote-state/manta/backend.go b/backend/remote-state/manta/backend.go index d4ec85c9c7..a3fdfe641c 100644 --- a/backend/remote-state/manta/backend.go +++ b/backend/remote-state/manta/backend.go @@ -53,7 +53,7 @@ func New() backend.Backend { "insecure_skip_tls_verify": { Type: schema.TypeBool, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("TRITON_SKIP_TLS_VERIFY", ""), + DefaultFunc: schema.EnvDefaultFunc("TRITON_SKIP_TLS_VERIFY", false), }, "path": { @@ -131,6 +131,9 @@ func (b *Backend) configure(ctx context.Context) error { if data.Get("key_id").(string) == "" { validationError = multierror.Append(validationError, errors.New("`Key ID` must be configured for the Triton provider")) } + if data.Get("key_id").(string) == "" { + validationError = multierror.Append(validationError, errors.New("`Key ID` must be configured for the Triton provider")) + } if b.path == "" { validationError = multierror.Append(validationError, errors.New("`Path` must be configured for the Triton provider")) }