virtuald/pyhcl

.tfvars nested list parse error

robeden opened this issue · 3 comments

This variable fails to parse in a .tfvars file:

MX_RECORDS = [
  ["", [
    "10 aspmx.l.google.com.",
    "20 alt1.aspmx.l.google.com.",
    "20 alt2.aspmx.l.google.com.",
    "30 aspmx3.googlemail.com.",
    "30 aspmx2.googlemail.com.",
  ]],
]

The error is: Line <LINE>, column <COLUMN>: unexpected LEFTBRACKET

It parses cleanly with Terraform and parsers linking with the Hashicorp HCL parser, so I think it should be valid.

Seems like a duplicate of other bugs. Happy to accept a fix.

PR submitted

Fixed in PR #68