Sha256: 43f15fb05cd0f78211b9948e04f6c2cae2af273ff49a0fe219d7f5d8d7fbfaf5

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

class Lono::Cfn::Delete
  include Lono::Cfn::AwsServices
  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?(: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

1 entries across 1 versions & 1 rubygems

Version Path
lono-3.5.0 lib/lono/cfn/delete.rb