elmundio87 / terraform_validate

Assists in the enforcement of user-defined standards in Terraform
GNU General Public License v3.0
257 stars 43 forks source link

Feature/git modules #28

Closed melbit-jonathanb closed 6 years ago

melbit-jonathanb commented 6 years ago

Hi,

I needed support for Git based modules, so I put this together.

A few points:

Let me know what you think.

cheers,

Jon.

melbit-jonathanb commented 6 years ago

Found an issue and an edge case. One tic

melbit-jonathanb commented 6 years ago

Right, found two issues which would have caused problems.

  1. some modules have ?ref=// - this is not really mentioned in terraform, but seems to be something which can happen. I have pulled apart the directory specification and ignored it, as the tool parses all directories.
  2. I had re-used some of the directory scanning and failed to change the variable names, which in some cases caused incorrect attempts to load files which weren't there. Fixed by changing variable names.
JEHAL981 commented 6 years ago

@elmundio87 Hey, just wondering if this going to be merged too master?

elmundio87 commented 6 years ago

Thanks for the PR!

@melbit-jonathanb & @JEHAL981 I will review the code changes tonight, and if all's good I'll create a new release.

-Ed

elmundio87 commented 6 years ago

Released in 2.7.0

melbit-jonathanb commented 6 years ago

@elmundio87 & @atward Hi,
I've performed a number of changes as suggested. I now have it following the load order closer as per Adam's comments and have fixed up the module loading issues observed.

Changes:

Let me know what you think. cheers,

Jon.