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:
parent
320fcf4942
commit
0930f9cd97
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue