Sha256: 50fc1c07cbb13343d170fd6def0853412390c32a4dcfe88dfd1b56ed7bffca5a

Contents?: true

Size: 683 Bytes

Versions: 9

Compression:

Stored size: 683 Bytes

Contents

module Pipedream
  class Delete
    include AwsServices

    def initialize(options)
      @options = options
      @pipeline_name = options[:pipeline_name] || inferred_pipeline_name
      @stack_name = options[:stack_name] || inferred_stack_name(@pipeline_name)
    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".color(:red)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pipedream-0.4.8 lib/pipedream/delete.rb
pipedream-0.4.7 lib/pipedream/delete.rb
pipedream-0.4.6 lib/pipedream/delete.rb
pipedream-0.4.5 lib/pipedream/delete.rb
pipedream-0.4.4 lib/pipedream/delete.rb
pipedream-0.4.3 lib/pipedream/delete.rb
pipedream-0.4.2 lib/pipedream/delete.rb
pipedream-0.4.1 lib/pipedream/delete.rb
pipedream-0.4.0 lib/pipedream/delete.rb