stelligent / config-lint

Command line tool to validate configuration files
https://stelligent.github.io/config-lint/#/
MIT License
193 stars 39 forks source link

Add support for all Terraform blocks #164

Closed aabouzaid closed 4 years ago

aabouzaid commented 4 years ago

Right now there is only support for the following Terraform blocks "resource", "data", "provider", and "module".

This PR to add support for other blocks "locals", "output", "provider", "terraform", "variable". So they also could be lined.

This fixes issues no.:

Thanks.

milldr commented 4 years ago

this is also a good addition, but there's a little extra work that needs to be done. Variable resolution breaks with this, and many tests fail as a result. For example, properties["ami"] resolves to ${var.ami} rather than the intended value, ami-f2d3638a. See the tests in linter/terraform_test.go

aabouzaid commented 4 years ago

@milldr I've checked it, the values are correct. There is no actual change in the logic.

With a quick look, the tests are fail for 2 reasons:

I will work on the tests asap.

aabouzaid commented 4 years ago

@milldr I've fixed the tests.

milldr commented 4 years ago

great! Can you please resolve the merge conflicts too?

aabouzaid commented 4 years ago

@milldr sure, I will :+1:

one question here please. do we also need to make the older version v11 compatible with the new changes?

milldr commented 4 years ago

there's no need to make the changes backwards compatible. we're only working to improve v12+ at this point, while supporting v11 as-is

aabouzaid commented 4 years ago

@milldr I'm done :-)