{"repo":"infrablocks/ruby_terraform","free":true,"listed":false,"github":"https://github.com/infrablocks/ruby_terraform","clone":"git clone https://github.com/infrablocks/ruby_terraform.git","description":"A simple Ruby wrapper for invoking terraform commands.","language":"Ruby","stars":112,"topics":["ruby","ruby-gem","terraform","command-line","rubygem","ruby-library"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"RubyTerraform A simple wrapper around the Terraform binary to allow execution from within a Ruby program, RSpec test or Rakefile. Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yourself as: $ gem install ruby-terraform Usage To require RubyTerraform : Supported versions and commands RubyTerraform supports all commands and options up to Terraform 1.5.7, except terraform console , terraform test and terraform version . Getting started There are a couple of ways to call Terraform using RubyTerraform . Firstly, the RubyTerraform module includes class methods for each of the supported Terraform commands. Each class method takes a parameter hash containing options to pass to Terraform. For example, to save the plan of changes for a Terraform configuration located under infra/network to a file called network.tfplan whilst providing some vars: To apply the generated plan of changes: ...and to destroy the resulting resources: Each class method also accepts a second hash argument of invocation options to use at command invocation time. Currently, the only supported option is :environment which allows environment variables to be exposed to Terraform. For example, to apply a configuration with trace level logging: Additionally, RubyTerraform allows command instances to be constructed and invoked separately. This is useful when you need to override global configuration on a command by command basis or when you need to pass a command arou","default_branch":null,"files":null,"tree":[],"storefront":"/r/infrablocks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/infrablocks/ruby_terraform/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}