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.
This commit is contained in:
James Bardin 2020-04-22 17:12:05 -04:00
parent 320fcf4942
commit 0930f9cd97
1 changed files with 4 additions and 4 deletions

View File

@ -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: