Sha256: 6367915d30ff2a3656997a5f773b9f288aed374e9e05df7e362014f6ea23b370

Contents?: true

Size: 626 Bytes

Versions: 2

Compression:

Stored size: 626 Bytes

Contents

module LonoCfn
  class Delete
    include AwsServices
    include Util

    def initialize(stack_name, options={})
      @stack_name = stack_name
      @options = options
      @project_root = options[:project_root] || '.'
    end

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

        if stack_exist?(@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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lono-cfn-1.0.1 lib/lono_cfn/delete.rb
lono-cfn-1.0.0 lib/lono_cfn/delete.rb