Sha256: 3c9b4b9a322f7b9eb1458eac1306fb09690c441047ce9fceb14f6239bc4e9998

Contents?: true

Size: 563 Bytes

Versions: 8

Compression:

Stored size: 563 Bytes

Contents

class Lono::Cfn::Delete
  include Lono::Cfn::AwsService
  include Lono::Cfn::Util

  def initialize(stack_name, options={})
    @stack_name = stack_name
    @options = options
  end

  def run
    message = "Deleted #{@stack_name} stack."
    if @options[:noop]
      puts "NOOP #{message}"
    else
      are_you_sure?(@stack_name, :delete)

      if stack_exists?(@stack_name)
        cfn.delete_stack(stack_name: @stack_name)
        puts message
      else
        puts "#{@stack_name.inspect} stack does not exist".colorize(:red)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lono-4.1.0 lib/lono/cfn/delete.rb
lono-4.0.6 lib/lono/cfn/delete.rb
lono-4.0.5 lib/lono/cfn/delete.rb
lono-4.0.4 lib/lono/cfn/delete.rb
lono-4.0.3 lib/lono/cfn/delete.rb
lono-4.0.2 lib/lono/cfn/delete.rb
lono-4.0.1 lib/lono/cfn/delete.rb
lono-4.0.0 lib/lono/cfn/delete.rb