Sha256: 31f28d8704902ef2cb18614fd5c64eebae64d868c03d3c173c6a192d68b7e8c8
Contents?: true
Size: 793 Bytes
Versions: 2
Compression:
Stored size: 793 Bytes
Contents
module Lono::Cfn class Cancel < Base def run stack = find_stack(@stack) unless stack logger.info "The '#{@stack}' stack does not exist. Unable to cancel" quit 1 end logger.info "Canceling updates to #{@stack}." logger.info "Current stack status: #{stack.stack_status}" if stack.stack_status == "CREATE_IN_PROGRESS" cfn.delete_stack(stack_name: @stack) logger.info "Canceling stack creation." elsif stack.stack_status == "UPDATE_IN_PROGRESS" cfn.cancel_update_stack(stack_name: @stack) logger.info "Canceling stack update." status.wait if @options[:wait] else logger.info "The stack is not in a state to that is cancelable: #{stack.stack_status}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lono-8.0.0.pre.rc2 | lib/lono/cfn/cancel.rb |
lono-8.0.0.pre.rc1 | lib/lono/cfn/cancel.rb |