Sha256: 2a5bec0264123c2d62e2bbfeb233dc9610cdf8b0c2555bba3509429518a9e96e

Contents?: true

Size: 875 Bytes

Versions: 4

Compression:

Stored size: 875 Bytes

Contents

require 'cli-format'

class Terraspace::CLI::Cloud
  class Runs < Terraspace::Command
    Help = Terraspace::CLI::Help
    Runs = Terraspace::Terraform::Cloud::Runs

    desc "list STACK", "List runs."
    long_desc Help.text("cloud:runs:list")
    option :format, desc: "Output formats: #{CliFormat.formats.join(', ')}"
    option :status, default: %w[pending planned], type: :array, desc: "Filter by statuses: pending, planned, all"
    def list(mod)
      Runs.new(options.merge(mod: mod)).list
    end

    desc "prune STACK", "Prune runs that are possible to cancel or discard."
    long_desc Help.text("cloud:runs:prune")
    option :noop, type: :boolean, desc: "Shows what would be cancelled/discarded."
    option :yes, aliases: :y, type: :boolean, desc: "bypass are you sure prompt"
    def prune(mod)
      Runs.new(options.merge(mod: mod)).prune
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
terraspace-0.3.3 lib/terraspace/cli/cloud/runs.rb
terraspace-0.3.2 lib/terraspace/cli/cloud/runs.rb
terraspace-0.3.1 lib/terraspace/cli/cloud/runs.rb
terraspace-0.3.0 lib/terraspace/cli/cloud/runs.rb