Don't interpolate multivariables during walkInput
We don't need these expanded for input, and if the multivar's count is a variable, it may be known but not available during the input walk.
This commit is contained in:
parent
fe5f519817
commit
9e8ddaed47
|
@ -540,6 +540,13 @@ func (i *Interpolater) computeResourceMultiVariable(
|
||||||
|
|
||||||
unknownVariable := unknownVariable()
|
unknownVariable := unknownVariable()
|
||||||
|
|
||||||
|
// If we're only looking for input, we don't need to expand a
|
||||||
|
// multi-variable. This prevents us from encountering things that should be
|
||||||
|
// known but aren't because the state has yet to be refreshed.
|
||||||
|
if i.Operation == walkInput {
|
||||||
|
return &unknownVariable, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Get the information about this resource variable, and verify
|
// Get the information about this resource variable, and verify
|
||||||
// that it exists and such.
|
// that it exists and such.
|
||||||
module, cr, err := i.resourceVariableInfo(scope, v)
|
module, cr, err := i.resourceVariableInfo(scope, v)
|
||||||
|
|
Loading…
Reference in New Issue