Class: Terrafying::Cli
- Inherits:
-
Thor
- Object
- Thor
- Terrafying::Cli
- Defined in:
- lib/terrafying/cli.rb
Instance Method Summary collapse
- #apply(path) ⇒ Object
- #destroy(path) ⇒ Object
- #graph(path) ⇒ Object
- #import(path, addr, id) ⇒ Object
- #json(path) ⇒ Object
- #list(path) ⇒ Object
- #plan(path) ⇒ Object
- #show_state(path) ⇒ Object
- #use_local_state(path) ⇒ Object
- #use_remote_state(path) ⇒ Object
- #validate(path) ⇒ Object
Instance Method Details
#apply(path) ⇒ Object
37 38 39 |
# File 'lib/terrafying/cli.rb', line 37 def apply(path) exit Config.new(path, ).apply end |
#destroy(path) ⇒ Object
43 44 45 |
# File 'lib/terrafying/cli.rb', line 43 def destroy(path) exit Config.new(path, ).destroy end |
#graph(path) ⇒ Object
26 27 28 |
# File 'lib/terrafying/cli.rb', line 26 def graph(path) exit Config.new(path, ).graph end |
#import(path, addr, id) ⇒ Object
68 69 70 |
# File 'lib/terrafying/cli.rb', line 68 def import(path, addr, id) exit Config.new(path, ).import(addr, id) end |
#json(path) ⇒ Object
48 49 50 |
# File 'lib/terrafying/cli.rb', line 48 def json(path) puts(Config.new(path, ).json) end |
#list(path) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/terrafying/cli.rb', line 13 def list(path) puts "Defined resources:\n\n" Config.new(path, ).list.each do |name| puts "#{name}" end end |
#plan(path) ⇒ Object
21 22 23 |
# File 'lib/terrafying/cli.rb', line 21 def plan(path) exit Config.new(path, ).plan end |
#show_state(path) ⇒ Object
53 54 55 |
# File 'lib/terrafying/cli.rb', line 53 def show_state(path) puts(Config.new(path, ).show_state) end |
#use_local_state(path) ⇒ Object
63 64 65 |
# File 'lib/terrafying/cli.rb', line 63 def use_local_state(path) puts(Config.new(path, ).use_local_state) end |
#use_remote_state(path) ⇒ Object
58 59 60 |
# File 'lib/terrafying/cli.rb', line 58 def use_remote_state(path) puts(Config.new(path, ).use_remote_state) end |