-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
Validate & linting doesn't work for projects with sub-directories #87
Comments
Hi @zacharyabresch ! v1.25.0 of |
I am using |
I finally got a chance to hook this up and |
@zacharyabresch can we close this issue ? |
I don't think this is fixed. I just installed v1.29.0 and I'm seeing lots of:
for terraform validate |
@ghostsquad Same behaviour in my case |
It seems that it is required to run |
Ping! Still facing this issue for both |
I just realized |
I have released an updated version (v1.44.0 ) where See #158 and updated terraform-aws-modules/terraform-aws-lambda#68 - here you can see how I use both |
To be fair, I was already using |
It may be that |
I would suggest updating the command init_output=$(terraform init -backend=false -upgrade=true 2>&1) |
I'm sad to be posting this because I've been struggling for days to get these simple pre-commit hooks to work. So far, the only one I've actually gotten functional is
terraform_fmt
. I'm aware of #59 but there's been no response there since October of 2019. Here are some details:terraform_validate
Fails with several errors:
Error: Module not installed
Error: provider.aws: no suitable version installed
Error: Could not satisfy plugin requirements
All of these are basically indicating the same thing,
init
has not been run in the sub-directory. There are a few problems with this:init
has indeed been run in each of these sub-directories but the pre-commit hook (or perhaps Terraform) doesn't seem to be awareterraform validate
from the project root directory succeeds without errorWhat is the pre-commit hook doing that the CLI command isn't (or vice-versa)?
terraform_tflint
I see several variations of the following error:
ERROR: unable to resolve endpoint for service "ecs", region "", err: UnknownEndpointError: could not resolve endpoint
(replaceecs
with any other service we're using)Error: An error occurred while invoking DescribeSecurityGroups; MissingRegion: could not find region configuration
Now, running
tflint --deep --module
returns one error (the first one detailed above) so this is also probably an issue with that tool but ... is no one else using sub-directories? I find that incredibly hard to believe.So, in the end, the only pre-commit hook I've gotten to work is
terraform_fmt
. Kind of disappointing as I've been extolling the value of validating & linting but am unable to deliver a working MVP to prove it due to the above problems.Has anyone experienced these pains? Are there any workarounds or fixes for the above issues? Any advice at all? Thanks for your time & effort.
The text was updated successfully, but these errors were encountered: