Skip to content

terraform_docs does not like "description" #47

Closed
HeadspaceMeditation/pre-commit-terraform
#16
@antonbabenko

Description

@antonbabenko

Since v1.13.0 when terraform_docs hook began to work with Terraform 0.12 syntax, the awk script which is used to do the magic for Terraform 0.12 types does not like variables or outputs named "description".

As a result, this module - https://github.com/terraform-aws-modules/terraform-aws-security-group - can't use this hook.

How to reproduce?

  1. Clone this repository
  2. Clone failing terraform-aws-module repository - https://github.com/terraform-aws-modules/terraform-aws-security-group
  3. cd terraform-aws-security-group
  4. pre-commit try-repo ~/cloned-repo/pre-commit-terraform terraform_docs --verbose --all-files

Error:

At 1:17: Unknown token: 1:17 IDENT var.description

@cytopia, could you take a look at this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions