Module: Proteus::Commands::Taint

Defined in:
lib/proteus/commands/taint.rb

Class Method Summary collapse

Class Method Details

.included(thor_class) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/proteus/commands/taint.rb', line 4

def self.included(thor_class)
  thor_class.class_eval do

    desc "taint", "Taints an existing resource"
    long_desc "      Taints an existing resource\n\n      --resource The resource to taint\n    LONGDESC\n    option :resource, type: :string, aliases: \"-r\", required: true\n    def taint\n      init(verbose: parent_options[:verbose])\n      confirm question: \"Do you really want to run 'terraform taint' on environment '\#{environment}' in context '\#{context}'?\", color: :on_red, exit_code: 0 do\n\n        taint_command = <<~TAINT_COMMAND\n          cd \#{context_path(context)} && \\\n          terraform taint \\\n          \#{options[:resource]}\n        TAINT_COMMAND\n        syscall taint_command.squeeze(' ')\n      end\n    end\n\n  end\nend\n"