Class: Kitchen::Terraform::CommandFlag::BackendConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/terraform/command_flag/backend_config.rb

Overview

BackendConfig is the class of objects which control the arguments to the backend configuration.

Instance Method Summary collapse

Constructor Details

#initialize(arguments:) ⇒ Kitchen::Terraform::CommandFlag::BackendConfig

#initialize prepares a new instance of the class.

Parameters:

  • arguments (Hash{String=>String})

    the arguments.



26
27
28
# File 'lib/kitchen/terraform/command_flag/backend_config.rb', line 26

def initialize(arguments:)
  self.arguments = arguments
end

Instance Method Details

#to_sString

Returns the backend configuration flag.

Returns:

  • (String)

    the backend configuration flag.



31
32
33
34
35
# File 'lib/kitchen/terraform/command_flag/backend_config.rb', line 31

def to_s
  arguments.map do |key, value|
    "-backend-config=\"#{key}=#{value}\""
  end.join " "
end