Module: Proteus::Commands::StateCommands::Show

Defined in:
lib/proteus/commands/state/show.rb

Class Method Summary collapse

Class Method Details

.included(thor_class) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/proteus/commands/state/show.rb', line 5

def self.included(thor_class)
  thor_class.class_eval do

    desc "show", "Show a resource in the state"
    def show(resource)
      list_cmd = <<~LIST_CMD
        cd #{context_path(context)} && \
        terraform state show #{resource}
      LIST_CMD

      init(verbose: parent_options[:verbose])

      syscall list_cmd.squeeze(' ')
    end

  end
end