terraform-linters / tflint

A Pluggable Terraform Linter
Mozilla Public License 2.0
4.98k stars 357 forks source link

Move recursive init output to debug when there are no changes #2150

Open pvickery-ParamountCommerce opened 3 weeks ago

pvickery-ParamountCommerce commented 3 weeks ago

With the current version of tflint, there can be a lot of output even when there are no changes. This PR moves the unneeded logs to DEBUG if there are no changes.

Fixes https://github.com/terraform-linters/tflint/issues/2146

❯ tflint --recursive --config=$(pwd)/.tflint.hcl --init

Installing plugins on each working directory...

====================================================
working directory: dir1

Plugin "aws" is already installed
====================================================
working directory: dir2

Plugin "aws" is already installed
====================================================
working directory: dir3

Plugin "aws" is already installed
...
❯ ~/projects/dist/tflint --recursive --config=$(pwd)/.tflint.hcl --init

Installing plugins on each working directory...

All plugins are already installed
pvickery-ParamountCommerce commented 3 weeks ago

@wata727 I made this PR from your suggestion https://github.com/terraform-linters/tflint/issues/2146#issuecomment-2447820056

I just had to change and remove some test cases because of the modified behavior. Let me know what you think