Class: Terrafying::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/terrafying/cli.rb

Instance Method Summary collapse

Instance Method Details

#apply(path) ⇒ Object



31
32
33
# File 'lib/terrafying/cli.rb', line 31

def apply(path)
  exit Config.new(path, options).apply
end

#destroy(path) ⇒ Object



37
38
39
# File 'lib/terrafying/cli.rb', line 37

def destroy(path)
  exit Config.new(path, options).destroy
end

#graph(path) ⇒ Object



25
26
27
# File 'lib/terrafying/cli.rb', line 25

def graph(path)
  exit Config.new(path, options).graph
end

#import(path, addr, id) ⇒ Object



62
63
64
# File 'lib/terrafying/cli.rb', line 62

def import(path, addr, id)
  exit Config.new(path, options).import(addr, id)
end

#json(path) ⇒ Object



42
43
44
# File 'lib/terrafying/cli.rb', line 42

def json(path)
  puts(Config.new(path, options).json)
end

#list(path) ⇒ Object



12
13
14
15
16
17
# File 'lib/terrafying/cli.rb', line 12

def list(path)
  puts "Defined resources:\n\n"
  Config.new(path, options).list.each do |name|
    puts "#{name}"
  end
end

#plan(path) ⇒ Object



20
21
22
# File 'lib/terrafying/cli.rb', line 20

def plan(path)
  exit Config.new(path, options).plan
end

#show_state(path) ⇒ Object



47
48
49
# File 'lib/terrafying/cli.rb', line 47

def show_state(path)
  puts(Config.new(path, options).show_state)
end

#use_local_state(path) ⇒ Object



57
58
59
# File 'lib/terrafying/cli.rb', line 57

def use_local_state(path)
  puts(Config.new(path, options).use_local_state)
end

#use_remote_state(path) ⇒ Object



52
53
54
# File 'lib/terrafying/cli.rb', line 52

def use_remote_state(path)
  puts(Config.new(path, options).use_remote_state)
end