lock was missing in the call to GetVariableValue

This commit is contained in:
James Bardin 2020-04-08 09:59:27 -04:00
parent 82ad9fd635
commit 695a5fe27d
1 changed files with 3 additions and 0 deletions

View File

@ -330,6 +330,9 @@ func (ctx *BuiltinEvalContext) SetModuleCallArguments(n addrs.ModuleCallInstance
} }
func (ctx *BuiltinEvalContext) GetVariableValue(addr addrs.AbsInputVariableInstance) cty.Value { func (ctx *BuiltinEvalContext) GetVariableValue(addr addrs.AbsInputVariableInstance) cty.Value {
ctx.VariableValuesLock.Lock()
defer ctx.VariableValuesLock.Unlock()
modKey := addr.Module.String() modKey := addr.Module.String()
modVars := ctx.VariableValues[modKey] modVars := ctx.VariableValues[modKey]
val, ok := modVars[addr.Variable.Name] val, ok := modVars[addr.Variable.Name]