pre-commit-terraform: terraform_docs failing on TF0.12

Hi,

This is connected to https://github.com/antonbabenko/pre-commit-terraform/pull/45 that was fixed in v1.15.0. That version has fixed the issue i had with mktemp but i am getting a new error on this version:

$ pre-commit run terraform_docs -a
Terraform docs...........................................................Failed
hookid: terraform_docs

2019/06/19 10:45:22 At 62:1: expected: IDENT | STRING | ASSIGN | LBRACE got: RBRACE

But on another terraform config we have the error slightly differs:

$ pre-commit run terraform_docs -a
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Terraform docs...........................................................Failed
hookid: terraform_docs

2019/06/19 10:48:03 At 24:11: nested object expected: LBRACE got: ASSIGN

Both of these worked previously as they have fully populated README’s. I would look into this further but not sure where the files are that the error location refers too (if you point me in the right direction i am more than happy to investigate)

Thanks,

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@thenom pre-commit autoupdate updated hooks to the very latest where terraform_docs has native support for Terraform 0.12.

Thanks for mentioning SKIP=...!