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-1.0.4 lib/terraspace/cli/tfc.rb
terraspace-1.0.3 lib/terraspace/cli/tfc.rb
terraspace-1.0.2 lib/terraspace/cli/tfc.rb
terraspace-1.0.1 lib/terraspace/cli/tfc.rb
terraspace-1.0.0 lib/terraspace/cli/tfc.rb
terraspace-0.7.2 lib/terraspace/cli/tfc.rb
terraspace-0.7.1 lib/terraspace/cli/tfc.rb
terraspace-0.7.0 lib/terraspace/cli/tfc.rb
terraspace-0.6.23 lib/terraspace/cli/tfc.rb
terraspace-0.6.22 lib/terraspace/cli/tfc.rb
terraspace-0.6.21 lib/terraspace/cli/tfc.rb
terraspace-0.6.20 lib/terraspace/cli/tfc.rb
terraspace-0.6.19 lib/terraspace/cli/tfc.rb
terraspace-0.6.18 lib/terraspace/cli/tfc.rb
terraspace-0.6.17 lib/terraspace/cli/tfc.rb
terraspace-0.6.16 lib/terraspace/cli/tfc.rb
terraspace-0.6.15 lib/terraspace/cli/tfc.rb
terraspace-0.6.13 lib/terraspace/cli/tfc.rb
terraspace-0.6.12 lib/terraspace/cli/tfc.rb
terraspace-0.6.11 lib/terraspace/cli/tfc.rb