terraform-linters / tflint

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

Add warnings to --module/--no-module and `module` attribute #1951

Closed wata727 closed 6 months ago

wata727 commented 11 months ago

Follow up of https://github.com/terraform-linters/tflint/pull/1918

The --call-module-type flag and the call_module_type attribute introduced in TFLint v0.50 have deprecated the --module/--no-module and the module attribute. To encourage migration to these, this PR adds warnings to stderr for the use of deprecated flags or attributes.

$ tflint --module
WARNING: --module is deprecated. Use --call-module-type=all instead.

$ tflint --no-module
WARNING: --no-module is deprecated. Use --call-module-type=none instead.

$ tflint
WARNING: "module" attribute in .tflint.hcl is deprecated. Use "call_module_type" instead.