Class: Kitchen::Terraform::Command::Validate::PostZeroFifteenZero

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

Overview

The root module is validated by running a command like the following example:

terraform validate \
  [-no-color] \
  <directory>

Instance Method Summary collapse

Constructor Details

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

#initialize prepares a new instance of the class.

Parameters:

  • config (Hash)

    the configuration of the driver.

Options Hash (config:):

  • :color (Boolean)

    a toggle of colored output from the Terraform client.



34
35
36
# File 'lib/kitchen/terraform/command/validate/post_zero_fifteen_zero.rb', line 34

def initialize(config:)
  self.color = ::Kitchen::Terraform::CommandFlag::Color.new enabled: config.fetch(:color)
end

Instance Method Details

#to_sString

Returns the command with flags.

Returns:

  • (String)

    the command with flags.



39
40
41
42
# File 'lib/kitchen/terraform/command/validate/post_zero_fifteen_zero.rb', line 39

def to_s
  "validate " \
  "#{color}"
end