steampipe
steampipe copied to clipboard
Improve the HCL parsing errors to include line numbers.
Is your feature request related to a problem? Please describe. In some places, the error message returned by the HCL parsing doesn't provide line numbers.
Dashboard Error
Failed to decode all mod hcl files
failed to parse dependency: invalid property path 'none' passed to ParseResourcePropertyPath
This particular error was generated by this code:
column "id" {
display = none
}
The fix was to put double quotes around none
.
column "id" {
display = "none"
}
In my case, I had two column
blocks that had the same problem with the missing double quotes.
Describe the solution you'd like Include which line the parsing error is happening on.
Other information
Just prior to getting the above error, I'd put some card
blocks inside a query
block where they do not belong. The HCL parse error message identified which line number the offending card
blocks were on. I was able to resolve the problem in less than a minute.