Class: Kitchen::Terraform::Command::WorkspaceDelete

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/terraform/command/workspace_delete.rb

Overview

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

terraform workspace delete <name>

Instance Method Summary collapse

Constructor Details

#initialize(config:) ⇒ Kitchen::Terraform::Command::WorkspaceDelete

Parameters:

  • config (Hash)

    the configuration of the driver.

Options Hash (config:):

  • :workspace_name (String)

    the name of the Terraform workspace.



26
27
28
# File 'lib/kitchen/terraform/command/workspace_delete.rb', line 26

def initialize(config:)
  self.workspace_name = config.fetch :workspace_name
end

Instance Method Details

#to_sString

Returns the command.

Returns:

  • (String)

    the command.



31
32
33
# File 'lib/kitchen/terraform/command/workspace_delete.rb', line 31

def to_s
  "workspace delete #{workspace_name}"
end