Add missing bool case

Fixes #20572
This commit is contained in:
Paul Tyng 2019-06-24 15:27:00 -04:00
parent 8f29e2e11f
commit ebea080aca
1 changed files with 3 additions and 1 deletions

View File

@ -689,8 +689,10 @@ var LookupFunc = function.New(&function.Spec{
return cty.StringVal(v.AsString()), nil
case ty.Equals(cty.Number):
return cty.NumberVal(v.AsBigFloat()), nil
case ty.Equals(cty.Bool):
return cty.BoolVal(v.True()), nil
default:
return cty.NilVal, errors.New("lookup() can only be used with flat lists")
return cty.NilVal, errors.New("lookup() can only be used with maps of primitive types")
}
}
}