Skip to content

Commit

Permalink
bugfix(parser): Fixed issue when trying to parse invalid variable (#3908
Browse files Browse the repository at this point in the history
)

Signed-off-by: Felipe Avelar <[email protected]>
  • Loading branch information
felipe-avelar authored Jul 27, 2021
1 parent d2f9b51 commit caac299
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/parser/terraform/converter/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (c *converter) convertExpression(expr hclsyntax.Expression) (interface{}, e
valueConverted, _ := expr.Value(&hcl.EvalContext{
Variables: inputVarMap,
})
if !valueConverted.Type().HasDynamicTypes() {
if !valueConverted.Type().HasDynamicTypes() && valueConverted.IsKnown() {
return ctyjson.SimpleJSONValue{Value: valueConverted}, nil
}
return c.wrapExpr(expr)
Expand Down

0 comments on commit caac299

Please sign in to comment.