class DockerRailsProxy::Stack::Destroy
Attributes
stacks[RW]
Public Instance Methods
process()
click to toggle source
# File lib/docker_rails_proxy/commands/stack/destroy.rb, line 29 def process begin print_options(stacks, 'Choose the stack number and press [ENTER]') stack_name = get_option(stacks) end while stack_name.blank? puts "You're about to destroy this stack: #{stack_name}, are you sure? [yes]:" exit unless $stdin.gets.chomp == 'yes' puts "Destroying #{stack_name} stack" system <<-EOS aws cloudformation delete-stack \ --stack-name '#{stack_name}' \ --profile '#{options[:profile]}' EOS end