Sha256: 3f0528ead1846cb1800ed08dbfb865e27c22ee045ab324e5c10850fdda54a657

Contents?: true

Size: 953 Bytes

Versions: 5

Compression:

Stored size: 953 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'
require_relative '../options/common'

module RubyTerraform
  module Commands
    class Destroy < Base
      include RubyTerraform::Options::Common

      def subcommands
        %w[destroy]
      end

      def options # rubocop:disable Metrics/MethodLength
        %w[
          -backup
          -compact-warnings
          -lock
          -lock-timeout
          -input
          -auto-approve
          -no-color
          -parallelism
          -refresh
          -state
          -state-out
          -target
          -var
          -var-file
        ] + super
      end

      def arguments(parameters)
        [parameters[:directory]]
      end

      def parameter_defaults(_parameters)
        { vars: {}, var_files: [], targets: [] }
      end

      def parameter_overrides(parameters)
        { backup: parameters[:no_backup] ? '-' : parameters[:backup] }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-terraform-0.65.0.pre.14 lib/ruby_terraform/commands/destroy.rb
ruby-terraform-0.65.0.pre.13 lib/ruby_terraform/commands/destroy.rb
ruby-terraform-0.65.0.pre.12 lib/ruby_terraform/commands/destroy.rb
ruby-terraform-0.65.0.pre.11 lib/ruby_terraform/commands/destroy.rb
ruby-terraform-0.65.0.pre.10 lib/ruby_terraform/commands/destroy.rb