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.
This commit is contained in:
parent
6a896c8748
commit
903852b8e2
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue