Sha256: 6de915cbde939be8a4d137d3ec86797ba05954d40f2bbeb08349443e6e6986e9

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

require_relative 'base'

module RubyTerraform
  module Commands
    class Destroy < Base
      def switches
        %w[
          -auto-approve
          -backup
          -force
          -no-color
          -state
          -target
          -var
          -var-file
        ]
      end

      def subcommands(_values)
        %w[destroy]
      end

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

      def option_default_values(_opts)
        { vars: {}, var_files: [], targets: [] }
      end

      def option_override_values(opts)
        { backup: opts[:no_backup] ? '-' : opts[:backup] }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-terraform-0.65.0.pre.8 lib/ruby_terraform/commands/destroy.rb
ruby-terraform-0.65.0.pre.7 lib/ruby_terraform/commands/destroy.rb