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

Failed to read module directory #84

Closed
konstantin-recurly opened this issue Jan 14, 2020 · 3 comments
Closed

Failed to read module directory #84

konstantin-recurly opened this issue Jan 14, 2020 · 3 comments

Comments

@konstantin-recurly
Copy link
Contributor

I had to upgrade terraform-docs because of issue with a null value in variables.tf
terraform-docs/terraform-docs#161
Now pre-commit complains about the directory.

Here is some information about the versions.
pre-commit-config.yaml

- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.22.0
  hooks:
    - id: terraform_fmt
    - id: terraform_docs

run pre-commit run -a

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

2020/01/14 16:27:41 Failed to read module directory: Module directory /var/folders/_v/n250j8397bj273wj64d3rz180000gn/T//terraform-docs-TQYHbozJA7.tf does not exist or cannot be read.

terraform-docs version

terraform-docs version
terraform-docs version v0.8.0-rc.2 d52122d darwin/amd64 BuildDate: 2020-01-12T20:38:24+0000
@maxgio92
Copy link

maxgio92 commented Jan 15, 2020

I'm experiencing the same issue:

Terraform validate without variables.....................................Passed
Terraform fmt............................................................Passed
Terraform docs...........................................................Failed
- hook id: terraform_docs
- exit code: 1

2020/01/15 18:22:39 Failed to read module directory: Module directory /tmp/terraform-docs-oXFApyympv.tf does not exist or cannot be read.

The file exists with 0600 permissions.

@lifeofguenter
Copy link

terraform-docs 0.8.0 has been released on brew, so unfortunately anyone installing/upgrading will not be able to use this pre-commit tool as of current.

@antonbabenko
Copy link
Owner

Resolved in #85

#85 (comment)

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

4 participants