infrablocks / ruby_terraform

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

Terraform 0.15a - Commands Only #53

Closed sa73917 closed 3 years ago

sa73917 commented 3 years ago

Haven't updated the README but other than that I'm pretty sure this covers all the various new commands (and parameter changes).

I split workspace into multiple commands as you mentioned in the RFC PR a while back which made it possible to remove the parameter from the subcommands method throughout. It also made an easy pattern to follow when bringing in the various state and providers commands.

As an aside, I wasn't sure what you thought about breaking changes so I included a workspace method on RubyTerraform that delegates to the appropriate command class based on the users operation: value so old code should still work as expected.

Let me know if it would be better if I pull out all the new commands from this PR and just include the "current" commands.. happy to split it if that helps. (appreciate this has a lot in it)

Thanks for putting up with me spamming you with PR's :-)

tobyclemson commented 3 years ago

Great work, thanks so much.

tobyclemson commented 3 years ago

@sa73917 I've added full documentation for the commands and static methods on RubyTerraform and released this as version 1 since there are a few small breaking changes.

You can see the documentation here: https://infrablocks.github.io/ruby_terraform/RubyTerraform.html and the README is updated to reflect the new docs.

Thanks again for all your hard work!

salimepoint commented 3 years ago

Thanks @tobyclemson. I had hoped to do more but my day job had me under the pump. I did occasionally having a look at the changes coming through over the last few weeks - interesting for me to see where you took things (only been doing ruby/OO for a year or so - so lots to learn!). Looking forward to kicking the tyres on the new version! :-)

tobyclemson commented 3 years ago

@salimepoint At some point I'll try and pull out the command framework and all the options stuff into a separate library as I think some of the other command wrappers I have would benefit. Thanks for the inspiration, starting to get somewhere quite flexible with this now :)