From 903852b8e20d02fb56333bf22e9941ea6a456839 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 29 May 2018 15:01:54 -0400 Subject: [PATCH] skip unset values in conection blocks There's no valid, null value for the connection strings, so we can skip over any unset values from the schema. --- terraform/eval_apply.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/terraform/eval_apply.go b/terraform/eval_apply.go index 2dd9112e3..69cbbf470 100644 --- a/terraform/eval_apply.go +++ b/terraform/eval_apply.go @@ -326,6 +326,12 @@ func (n *EvalApplyProvisioners) apply(ctx EvalContext, provs []*configs.Provisio kv, vv := it.Element() var k, v string + // there are no unset or null values in a connection block, and + // everything needs to map to a string. + if vv.IsNull() { + continue + } + err := gocty.FromCtyValue(kv, &k) if err != nil { // Should never happen, because connectionBlockSupersetSchema requires all primitives @@ -339,6 +345,7 @@ func (n *EvalApplyProvisioners) apply(ctx EvalContext, provs []*configs.Provisio overlay[k] = v } + state.Ephemeral.ConnInfo = overlay }