class RubyTerraform::Commands::WorkspaceNew

Wraps the +terraform workspace new+ command which creates a new workspace.

For options accepted on construction, see {#initialize}.

When executing an instance of {WorkspaceNew} via {#execute}, the following options are supported:

@example Basic Invocation

RubyTerraform::Commands::WorkspaceNew.new.execute(
  name: 'example')

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/workspace_new.rb, line 48
def arguments(parameters)
  [parameters[:name], parameters[:directory]]
end
options() click to toggle source

@!visibility private

Calls superclass method RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/workspace_new.rb, line 39
def options
  %w[
    -lock
    -lock-timeout
    -state
  ] + super
end
subcommands() click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/workspace_new.rb, line 34
def subcommands
  %w[workspace new]
end