Sha256: fe146e76be1349c344b217621a302963eb53976557d63cbbd853dc8c735e786d
Contents?: true
Size: 721 Bytes
Versions: 12
Compression:
Stored size: 721 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 =~ /_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
12 entries across 12 versions & 1 rubygems