mschuchard / linter-terraform-syntax

terraform validate linter and formatter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support custom variable files

stefanberkner opened this issue · comments

Hi,

during development, we are using the option -var-file=foo on a per user level. However due to this, the linter will complain, that the variables without default values are not set:

Non-syntax error in directory: Required variable not set: varname

Right now, the only workaround I see, is to create a custom bash file, which will forward the command with appended -var-file option. This script can then be used in the terraform executable path.

The better way would probably be to add support for custom options.

The problem here is that typically this setting is set on a per-project level, and the corresponding setting for this in the package would be a on a global level. Also, I would need to do a distinction between vars file(s) set globally and those set in a project.

I will leave this here for tracking.

Yes, I do understand this issue. Though in our case it will always be the same for every project.

Theoretically enabled in 8c6f863 and caae1fc. Patch the main.js into your local package, give it a test run, and let me know how it goes.

I can confirm that it works as expected. Tested it for both cases.

Great; I was having difficulty describing how either of them should be used so I did not know if people would understand what I was trying to say, but it seems like it made sense to you.