Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: terraform_validate: accept --var-file option #118

Closed
wants to merge 1 commit into from

Conversation

robinbowes
Copy link
Contributor

@robinbowes robinbowes commented Jun 15, 2020

This change adds the --var-file option to terraform_validate.

I wrote it without realising terraform_tflint already supported command-line arguments and used an alternate algorithm, ie. not the re-implementation of getopts embedded in terraform_tflint.

I also missed that @paullschock had submitted #114 recently, which does something similar.

Finally, I've also just noticed that the --var-file option is not present in 0.12.x (we're still on 0.11.x at the moment).

Fixes #116

@robinbowes robinbowes changed the title terraform_validate: accept --var-file option fixterraform_validate: accept --var-file option Jun 15, 2020
@robinbowes robinbowes changed the title fixterraform_validate: accept --var-file option fix: terraform_validate: accept --var-file option Jun 15, 2020
@robinbowes
Copy link
Contributor Author

@antonbabenko Can you give me/@paullschock some guidance about this PR and #114 ?

I'd really like to have the functionality of passing args to terraform_validate and I don't much care whether it's this code or Paul's.

Thanks,

R.

@paullschock
Copy link

Just want to add in my 2c: I like this implementation, my main goal in mine was to support environment vars, and fixing the params was more just for consistency. If this gets accepted, I'd happily put in effort to extend envVar support into this implementation.

@robinbowes
Copy link
Contributor Author

Another possibility would be to break out the getopt implementation into a separate file and include it in both terraform_validate and terraform_tflint.

@Gibby
Copy link

Gibby commented Aug 25, 2020

Any movement on this one?

@robinbowes
Copy link
Contributor Author

@Gibby I think this is a better implementation: #125

@antonbabenko
Copy link
Owner

Yes, #125 has been merged and v1.33.0 has been just released.

@robinbowes robinbowes deleted the pass_args branch September 8, 2020 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass custom tfvar file to terraform validate
4 participants