Class: Kitchen::Terraform::Command::WorkspaceNew
- Inherits:
-
Object
- Object
- Kitchen::Terraform::Command::WorkspaceNew
- Defined in:
- lib/kitchen/terraform/command/workspace_new.rb
Overview
The workspace is created by running a command like the following example:
terraform workspace new <name>
Instance Method Summary collapse
-
#initialize(config:) ⇒ Kitchen::Terraform::Command::WorkspaceNew
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The command.
Constructor Details
#initialize(config:) ⇒ Kitchen::Terraform::Command::WorkspaceNew
#initialize prepares a new instance of the class.
28 29 30 |
# File 'lib/kitchen/terraform/command/workspace_new.rb', line 28 def initialize(config:) self.workspace_name = config.fetch :workspace_name end |
Instance Method Details
#to_s ⇒ String
Returns the command.
33 34 35 |
# File 'lib/kitchen/terraform/command/workspace_new.rb', line 33 def to_s "workspace new #{workspace_name}" end |