Replies: 5 comments 13 replies
-
It's probably possible to use Are there any issues that |
Beta Was this translation helpful? Give feedback.
-
I am also interested in this feature but maybe I rephrase it a bit. The possibility to exclude a folder if using the |
Beta Was this translation helpful? Give feedback.
-
Thanks for your replies, what I would like to do is: for example, I have three folders except for two (as state above):
And now I want to run
|
Beta Was this translation helpful? Give feedback.
-
Hello, Our use case of tflint and why it will be helpful to have an option to ignore whole folders when running tflint with --recursive (if possible) At my company we are managing around 100 repositories for different clients. The reason why we need to ignore some folders is that the code there is from modules that are managed from different teams and having to clean all the checks from there (sometimes 50-60-100) would be an error prone process as they are related to CICD pipelines, Landing zones etc. and we are not aware if those unused declarations are left on purpose and will not be used in the future. To manually enter 100 lines of comments in the code for each of the resources also sounds not right as it adds too many lines of unnecessary code to the repositories. It would be great if we can specify somewhere in the .tflint.hcl file for example in each repository which folder path we want to ignore. Or similar functionality with a file. That would help us a lot and I believe others will agree. |
Beta Was this translation helpful? Give feedback.
-
Hi @bendrucker, circling back to this, Is it something I can contribute to? Would love to have this feature in tflint:
|
Beta Was this translation helpful? Give feedback.
-
Introduction
Currently, the
--recursive
flag only works with--filter
if an exact file is mentioned. For example:tflint --recursive --filter main.tf
But if we want to filter based on a certain subdir in a project folder, it doesn't work.
Working with
--recursive
and--chdir
gives the following error:Proposal
For the following configuration: if we have two folders under a project folder:
We want to target .tf files in
test_tf_1
only, how will be able to achieve that? In this case scenario, something like this could really helptflint --recursive --filter ./test_tf_1/..
ortflint --chdir='./test_tf_1' --recursive
when running from the root of the project.References
This request was initially raised as a bug issue first:
Beta Was this translation helpful? Give feedback.
All reactions