virtuald/pyhcl

Parser failed when reading tf file for aws module

amjosuesanchez opened this issue · 2 comments

1st error

unexpected IDENTIFIER; expected PERIOD

Caused by

resource "aws_instance" "ldap" {
...
  subnet_id              = var.private_subnets[0]
...
}

2nd error

unexpected ASTERISK_PERIOD; expected NUMBER, MULTICOMMENT, MULTIPLY, MINUS, STRING, COMMENT, LE, NE, LT, COMMA, LEFTBRACKET, IDENTIFIER, $end, GT, DIVIDE, LEFTPAREN, RIGHTBRACE, GE, EQ, QMARK, FLOAT, ADD

Caused by

resource "aws_route53_record" "ldap_int" {
...
records = aws_instance.ldap.*.private_ip
...
}

That doesn't appear to be valid HCL? Or if it is, maybe it's an HCL2 thing, which wouldn't be supported by this library.

It is HCL2, which is not supported by pyhcl.