Sha256: 50ef61817cfd915730e92c914c6533b425443bc2d6af823bda83ee2d193e6f3f

Contents?: true

Size: 436 Bytes

Versions: 25

Compression:

Stored size: 436 Bytes

Contents

class Terraspace::CLI
  class Down < Base
    include TfcConcern

    def run
      plan if @options[:yes] && !tfc?
      destroy
    end

  private
    def plan
      Commander.new("plan", @options.merge(destroy: true)).run
    end

    def destroy
      Commander.new("destroy", @options.merge(command: "down")).run
      Terraspace::Terraform::Cloud::Workspace.new(@options).destroy if @options[:destroy_workspace]
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
terraspace-0.5.12 lib/terraspace/cli/down.rb
terraspace-0.5.11 lib/terraspace/cli/down.rb
terraspace-0.5.10 lib/terraspace/cli/down.rb
terraspace-0.5.9 lib/terraspace/cli/down.rb
terraspace-0.5.8 lib/terraspace/cli/down.rb
terraspace-0.5.7 lib/terraspace/cli/down.rb
terraspace-0.5.6 lib/terraspace/cli/down.rb
terraspace-0.5.5 lib/terraspace/cli/down.rb
terraspace-0.5.4 lib/terraspace/cli/down.rb
terraspace-0.5.3 lib/terraspace/cli/down.rb
terraspace-0.5.2 lib/terraspace/cli/down.rb
terraspace-0.5.1 lib/terraspace/cli/down.rb
terraspace-0.5.0 lib/terraspace/cli/down.rb
terraspace-0.4.4 lib/terraspace/cli/down.rb
terraspace-0.4.3 lib/terraspace/cli/down.rb
terraspace-0.4.2 lib/terraspace/cli/down.rb
terraspace-0.4.1 lib/terraspace/cli/down.rb
terraspace-0.4.0 lib/terraspace/cli/down.rb
terraspace-0.3.6 lib/terraspace/cli/down.rb
terraspace-0.3.5 lib/terraspace/cli/down.rb