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

terraform_validate_no_variables fails if there is no .tf files #19

Closed
robinbowes opened this issue May 24, 2018 · 2 comments
Closed

terraform_validate_no_variables fails if there is no .tf files #19

robinbowes opened this issue May 24, 2018 · 2 comments

Comments

@robinbowes
Copy link
Contributor

I've got a terragrunt config tree like this:

live
├── aws
│   ├── aws
│   │   ├── cloud.tfvars
│   │   ├── eu-west-1
│   │   │   ├── development
│   │   │   │   └── terraform.tfvars
│   │   │   ├── production
│   │   │   │   └── terraform.tfvars
│   │   │   ├── region.tfvars
│   │   │   └── staging
│   │   │       └── terraform.tfvars
│   │   └── us-east-1
│   │       └── development
│   └── site.tfvars
└── terraform.tfvars

I have the terraform_validate_no_variables pre-commit hook enabled and it fails with the following msg:

Error: No Terraform configuration files found in directory:
@antonbabenko
Copy link
Owner

Looks like a bug. It should verify that there are *.tf files between line 17 and 18:

pushd "$path_uniq" > /dev/null
terraform validate -check-variables=false

@robinbowes
Copy link
Contributor Author

Gotta love open source.

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

2 participants