Sha256: bc5acecb909eb17c43b62fee3712414bfa2a9e8fc528506f835c399659282687

Contents?: true

Size: 726 Bytes

Versions: 16

Compression:

Stored size: 726 Bytes

Contents

module Ufo
  class Cancel < Base
    def run
      stack = find_stack(@stack_name)
      unless stack
        puts "No #{@service} service to cancel."
        puts "No #{@stack_name} stack to cancel. Exiting"
        exit
      end

      puts "Canceling updates to #{@stack_name}."
      if stack.stack_status == "CREATE_IN_PROGRESS"
        cloudformation.delete_stack(stack_name: @stack_name)
        puts "Canceling stack creation."
      elsif stack.stack_status == "UPDATE_IN_PROGRESS"
        cloudformation.cancel_update_stack(stack_name: @stack_name)
        puts "Canceling stack update."
      else
        puts "The stack is not in a state to that is cancelable: #{stack.stack_status}"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ufo-5.0.7 lib/ufo/cancel.rb
ufo-5.0.6 lib/ufo/cancel.rb
ufo-5.0.5 lib/ufo/cancel.rb
ufo-5.0.4 lib/ufo/cancel.rb
ufo-5.0.3 lib/ufo/cancel.rb
ufo-5.0.2 lib/ufo/cancel.rb
ufo-5.0.1 lib/ufo/cancel.rb
ufo-5.0.0 lib/ufo/cancel.rb
ufo-4.6.3 lib/ufo/cancel.rb
ufo-4.6.2 lib/ufo/cancel.rb
ufo-4.6.1 lib/ufo/cancel.rb
ufo-4.6.0 lib/ufo/cancel.rb
ufo-4.5.11 lib/ufo/cancel.rb
ufo-4.5.10 lib/ufo/cancel.rb
ufo-4.5.9 lib/ufo/cancel.rb
ufo-4.5.8 lib/ufo/cancel.rb