parent
8f29e2e11f
commit
ebea080aca
|
@ -689,8 +689,10 @@ var LookupFunc = function.New(&function.Spec{
|
||||||
return cty.StringVal(v.AsString()), nil
|
return cty.StringVal(v.AsString()), nil
|
||||||
case ty.Equals(cty.Number):
|
case ty.Equals(cty.Number):
|
||||||
return cty.NumberVal(v.AsBigFloat()), nil
|
return cty.NumberVal(v.AsBigFloat()), nil
|
||||||
|
case ty.Equals(cty.Bool):
|
||||||
|
return cty.BoolVal(v.True()), nil
|
||||||
default:
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue