Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing array indexes #9

Open
marquesarthur opened this issue Nov 19, 2021 · 0 comments
Open

Error parsing array indexes #9

marquesarthur opened this issue Nov 19, 2021 · 0 comments

Comments

@marquesarthur
Copy link

Thanks for the great library. I got some errors trying to parse the following .tf

resource "aws_s3_bucket_public_access_block" "artifacts" {
  count  = var.bucketname == "" ? 1 : 0
  bucket = aws_s3_bucket.artifacts[0].id
  
  block_public_acls   = true
  block_public_policy = true
  restrict_public_buckets = true
  ignore_public_acls=true
}

I know that support for vars might be a duplicate of #4 but even removing the var line, I get an error because of the array index:

> HCL.parse(fs.readFileSync("test.tf", "utf-8"))
'unable to parse JSON: At 2:12: Unknown token: 2:12 IDENT aws_s3_bucket.artifacts'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant