infrablocks / ruby_terraform

A simple Ruby wrapper for invoking terraform commands.
MIT License
109 stars 33 forks source link

Allow multiple -var-file options #15

Closed arodriguezdlc closed 6 years ago

arodriguezdlc commented 6 years ago

Hello!

I would like to add support for multiple -var-file options in apply, plan, destroy, refresh and validate commands. Currently, this gem allows to pass only one var-file, but you can see on terraform documentation that this flag can be used multiple times.

Now an array of files can be passed to support multiple var-file flags. Also, I have ensured that this change is retrocompatible, so you can still pass only one var-file option as a string.

I have added some tests to check that the new feature works keeping all previous tests, which also work =). Documentation has been updated too.

I hope this PR will be useful! Thanks!

tobyclemson commented 6 years ago

Hi Alberto,

Thanks for the PR, I left a couple of comments inline.

Let me know what you think, Toby

arodriguezdlc commented 6 years ago

Hi Toby, I have just pushed a new commit adding var_files option, with behaviour that you described before. Let me know if you are agree with this changes! Also I added some test to verify that both options (var_file and var_files) work together =).

Thanks!!

tobyclemson commented 6 years ago

Looks good, merging now and will release shortly.

arodriguezdlc commented 6 years ago

Nice, thanks!!

arodriguezdlc commented 6 years ago

Hi Toby! do you know when could you release? It would be so useful for us to have this feature pushed to rubygems. Thanks!!

tobyclemson commented 6 years ago

Hi Alberto,

Sorry, I’ll aim to get this released tonight.

Thanks, Toby On Mon, 25 Jun 2018 at 09:08, Alberto Rodríguez notifications@github.com wrote:

Hi Toby! do you know when could you release? It would be so useful for us to have the release pushed to rubygems. Thanks!!

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/infrablocks/ruby_terraform/pull/15#issuecomment-399868195, or mute the thread https://github.com/notifications/unsubscribe-auth/AABAH4retooBLa56xXs26FCoPT4M-hwWks5uAJqSgaJpZM4UuC-O .

arodriguezdlc commented 6 years ago

Ok, thank you!

tobyclemson commented 6 years ago

Version 0.13.0 contains this change.

Thanks, Toby