You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The specifics are not important, but the general problem is that running tflint --chdir infra/ seems to only check infra/main.tf, but running tflint --recursive ends up wasting a ton of time scanning node_modules/, tmp/, and other large directories without any terraform configuration.
As a work-around, I can cd into the infra/ directory before running tflint --recursive, but I would expect this tool to work similarly to terraform and allow me to specify --chdir infra/ and --recursive to tell TFLint to start recursing from the infra/ directory.
Proposal
Allow the use of both --chdir and --recursive together.
Recursion should start from the directory specified by the --chdir flag.
Introduction
Terraform allows using both the
-chdir
and-recursive
flags, e.g.terraform -chdir=infra/ fmt -check -recursive
I expected to be able to do something similar with TFLint, but got an error
I am running my formatters/linters from the project root for other tools but am having trouble doing that with TFLint.
My directory structure looks similar to
The specifics are not important, but the general problem is that running
tflint --chdir infra/
seems to only checkinfra/main.tf
, but runningtflint --recursive
ends up wasting a ton of time scanningnode_modules/
,tmp/
, and other large directories without any terraform configuration.As a work-around, I can
cd
into theinfra/
directory before runningtflint --recursive
, but I would expect this tool to work similarly to terraform and allow me to specify--chdir infra/
and--recursive
to tell TFLint to start recursing from theinfra/
directory.Proposal
Allow the use of both
--chdir
and--recursive
together.Recursion should start from the directory specified by the
--chdir
flag.References
#1304 (comment)
https://developer.hashicorp.com/terraform/cli/commands/fmt#recursive
The text was updated successfully, but these errors were encountered: