in helper/utils.go [195:206]
func GetValueFromExpression(tokens hclwrite.Tokens) interface{} {
expression, _ := hclsyntax.ParseExpression(tokens.Bytes(), "", hcl.InitialPos)
if value, dialog := expression.Value(&hcl.EvalContext{}); dialog == nil || !dialog.HasErrors() {
if data, err := ctyJson.Marshal(value, value.Type()); err == nil {
var input interface{}
if err = json.Unmarshal(data, &input); err == nil {
return input
}
}
}
return nil
}