Sha256: fbe76ebd01c9cfee719e610995876df4fdefaef641db42635b1df3f6b9b26d14

Contents?: true

Size: 1.02 KB

Versions: 71

Compression:

Stored size: 1.02 KB

Contents

class Terraspace::CLI
  class Tfc < Terraspace::Command
    Syncer = Terraspace::Terraform::Tfc::Syncer
    Workspace = Terraspace::Terraform::Tfc::Workspace

    yes_option = Proc.new {
      option :yes, aliases: :y, type: :boolean, desc: "bypass are you sure prompt"
    }

    desc "list", "List workspaces"
    long_desc Help.text("cloud:list")
    yes_option.call
    def list
      Workspace.new(options).list
    end

    desc "destroy STACK", "Destroy workspace by specifying the stack"
    long_desc Help.text("cloud:destroy")
    yes_option.call
    def destroy(mod)
      Workspace.new(options.merge(mod: mod)).destroy
    end

    desc "sync [STACK]", "Sync all or multiple workspaces."
    long_desc Help.text("cloud:sync")
    yes_option.call
    def sync(*stacks)
      Terraspace::CLI::Build::Placeholder.new(options).build
      Syncer.new(options.merge(stacks: stacks, override_auto_sync: true)).run
    end

    desc "runs SUBCOMMAND", "runs subcommands"
    long_desc Help.text(:runs)
    subcommand "runs", Runs
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/cli/tfc.rb
terraspace-2.2.16 lib/terraspace/cli/tfc.rb
terraspace-2.2.15 lib/terraspace/cli/tfc.rb
terraspace-2.2.14 lib/terraspace/cli/tfc.rb
terraspace-2.2.13 lib/terraspace/cli/tfc.rb
terraspace-2.2.12 lib/terraspace/cli/tfc.rb
terraspace-2.2.11 lib/terraspace/cli/tfc.rb
terraspace-2.2.10 lib/terraspace/cli/tfc.rb
terraspace-2.2.9 lib/terraspace/cli/tfc.rb
terraspace-2.2.8 lib/terraspace/cli/tfc.rb
terraspace-2.2.7 lib/terraspace/cli/tfc.rb
terraspace-2.2.6 lib/terraspace/cli/tfc.rb
terraspace-2.2.5 lib/terraspace/cli/tfc.rb
terraspace-2.2.4 lib/terraspace/cli/tfc.rb
terraspace-2.2.3 lib/terraspace/cli/tfc.rb
terraspace-2.2.2 lib/terraspace/cli/tfc.rb
terraspace-2.2.1 lib/terraspace/cli/tfc.rb
terraspace-2.2.0 lib/terraspace/cli/tfc.rb
terraspace-2.1.7 lib/terraspace/cli/tfc.rb
terraspace-2.1.6 lib/terraspace/cli/tfc.rb