class Kitchen::Terraform::Command::WorkspaceNew

The workspace is created by running a command like the following example:

terraform workspace new <name>

Attributes

workspace_name[RW]

Public Class Methods

new(config:) click to toggle source

initialize prepares a new instance of the class.

@param config [Hash] the configuration of the driver. @option config [String] :workspace_name the name of the Terraform workspace. @return [Kitchen::Terraform::Command::WorkspaceNew]

# File lib/kitchen/terraform/command/workspace_new.rb, line 28
def initialize(config:)
  self.workspace_name = config.fetch :workspace_name
end

Public Instance Methods

to_s() click to toggle source

@return [String] the command.

# File lib/kitchen/terraform/command/workspace_new.rb, line 33
def to_s
  "workspace new #{workspace_name}"
end