Sha256: d805c1b1fa21524ed0a6fa0edf3eb33d97c93a2661890e011762edc2c765db2b

Contents?: true

Size: 565 Bytes

Versions: 14

Compression:

Stored size: 565 Bytes

Contents

class Lono::Cfn
  class Rollback
    extend Memoist
    include Lono::AwsServices

    def initialize(stack_name)
      @stack_name = stack_name
    end

    def delete_stack
      stack = find_stack(@stack_name)
      if stack && rollback_complete?(stack)
        puts "Existing stack in ROLLBACK_COMPLETE state. Deleting stack before continuing."
        cfn.delete_stack(stack_name: @stack_name)
        status.wait
        status.reset
        true
      end
    end

    def status
      Lono::Cfn::Status.new(@stack_name)
    end
    memoize :status
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
lono-6.1.11 lib/lono/cfn/rollback.rb
lono-6.1.10 lib/lono/cfn/rollback.rb
lono-6.1.9 lib/lono/cfn/rollback.rb
lono-6.1.8 lib/lono/cfn/rollback.rb
lono-6.1.7 lib/lono/cfn/rollback.rb
lono-6.1.6 lib/lono/cfn/rollback.rb
lono-6.1.5 lib/lono/cfn/rollback.rb
lono-6.1.4 lib/lono/cfn/rollback.rb
lono-6.1.3 lib/lono/cfn/rollback.rb
lono-6.1.2 lib/lono/cfn/rollback.rb
lono-6.1.1 lib/lono/cfn/rollback.rb
lono-6.1.0 lib/lono/cfn/rollback.rb
lono-6.0.1 lib/lono/cfn/rollback.rb
lono-6.0.0 lib/lono/cfn/rollback.rb