Skip to content

Commit

Permalink
fix(core): Fixed error treating when can't infer type from functions (C…
Browse files Browse the repository at this point in the history
…heckmarx#4172)

Signed-off-by: Felipe Avelar <[email protected]>
  • Loading branch information
felipe-avelar authored Sep 8, 2021
1 parent ad3019b commit 97a033a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/parser/terraform/converter/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ func createEntryInputVar(path []string, defaultValue string) (cty.Value, error)
}
}
mapJSON += closeMap
jsonType, _ := ctyjson.ImpliedType([]byte(mapJSON))
jsonType, err := ctyjson.ImpliedType([]byte(mapJSON))
if err != nil {
return cty.NilVal, err
}
value, err := ctyjson.Unmarshal([]byte(mapJSON), jsonType)
if err != nil {
return cty.NilVal, err
Expand Down

0 comments on commit 97a033a

Please sign in to comment.