class Ruby::Terraform::Commands::OutputCommand

Attributes

dir[RW]
json[RW]
name[RW]
state[RW]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/ruby/terraform/commands/output_command.rb, line 12
def initialize(opts = {})
  @dir = opts[:dir]
  @state = opts[:state]
  @json = opts[:json]
  @name = opts[:name]
end

Public Instance Methods

command() click to toggle source
# File lib/ruby/terraform/commands/output_command.rb, line 19
def command
  cmd = %W[#{tf_binary} output]

  cmd += ['-state', state] if state
  cmd += ['-json'] if json
  cmd += [name] if name
  cmd
end