From 0930f9cd9731fa4e746ef459bbcadf0fd6b8a120 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 22 Apr 2020 17:12:05 -0400 Subject: [PATCH] use object and tuple for module eval The outputs may be fed from dynamic types, so we need to use object, tuple, and dynamic values. --- terraform/evaluate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/evaluate.go b/terraform/evaluate.go index bddac5412..8b7bebd0a 100644 --- a/terraform/evaluate.go +++ b/terraform/evaluate.go @@ -473,9 +473,9 @@ func (d *evaluationStateData) GetModule(addr addrs.ModuleCall, rng tfdiags.Sourc last = i } vals = vals[:last+1] - ret = cty.ListVal(vals) + ret = cty.TupleVal(vals) } else { - ret = cty.ListValEmpty(cty.DynamicPseudoType) + ret = cty.DynamicVal } case callConfig.ForEach != nil: @@ -490,9 +490,9 @@ func (d *evaluationStateData) GetModule(addr addrs.ModuleCall, rng tfdiags.Sourc } if len(vals) > 0 { - ret = cty.MapVal(vals) + ret = cty.ObjectVal(vals) } else { - ret = cty.MapValEmpty(cty.DynamicPseudoType) + ret = cty.DynamicVal } default: