terraform-linters / tflint

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

Allow config file to be specified via TFLINT_CONFIG #1828

Closed joaocc closed 1 year ago

joaocc commented 1 year ago

Introduction

tflint already provides config settings as env variables. One that seems lacking is TFLINT_CONFIG, as an lower-priority option for the --config file. If defined, TFLINT_CONFIG would be used in the same way as --config, unless --config is defined.

bendrucker commented 1 year ago

Existing:

https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/environment_variables.md

Would provide parity with:

https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_cli_config_file