Sha256: 7654239ffc7ad2f12d3304acefdbd83e770b1b916946aebbeb8c89c0fad5e211

Contents?: true

Size: 837 Bytes

Versions: 3

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true
require "cri"

require "cfer/auster/cli/_shared"

module Cfer
  module Auster
    module CLI
      def self.destroy
        Cri::Command.define do
          name "destroy"
          usage "destroy aws-region/config-set count-or-tag"
          description "Destroys this Auster step in your AWS account."

          CLI.standard_options(self)

          run do |opts, args, cmd|
            if args.length < 2
              puts cmd.help
              exit 1
            else
              CLI.repo_from_options(opts) do |repo|
                args = args.dup
                config_set = repo.config_set(args.shift)
                step = repo.step_by_count_or_tag(args.shift)

                step.destroy(config_set)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
auster-0.4.0 lib/cfer/auster/cli/destroy.rb
auster-0.3.1 lib/cfer/auster/cli/destroy.rb
auster-0.3.0 lib/cfer/auster/cli/destroy.rb