Class: Kitchen::Terraform::Command::Validate::PreZeroFifteenZero
- Inherits:
-
Object
- Object
- Kitchen::Terraform::Command::Validate::PreZeroFifteenZero
- Defined in:
- lib/kitchen/terraform/command/validate/pre_zero_fifteen_zero.rb
Overview
The root module is validated by running a command like the following example:
terraform validate \
[-no-color] \
[-var=<variables.first>...] \
[-var-file=<variable_files.first>...] \
<directory>
Instance Method Summary collapse
-
#initialize(config:) ⇒ Kitchen::Terraform::Command::Validate
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The command with flags.
Constructor Details
#initialize(config:) ⇒ Kitchen::Terraform::Command::Validate
#initialize prepares a new instance of the class.
40 41 42 43 44 |
# File 'lib/kitchen/terraform/command/validate/pre_zero_fifteen_zero.rb', line 40 def initialize(config:) self.color = ::Kitchen::Terraform::CommandFlag::Color.new enabled: config.fetch(:color) self.var_file = ::Kitchen::Terraform::CommandFlag::VarFile.new pathnames: config.fetch(:variable_files) self.var = ::Kitchen::Terraform::CommandFlag::Var.new arguments: config.fetch(:variables) end |
Instance Method Details
#to_s ⇒ String
Returns the command with flags.
47 48 49 50 51 52 |
# File 'lib/kitchen/terraform/command/validate/pre_zero_fifteen_zero.rb', line 47 def to_s "validate " \ "#{color} " \ "#{var} " \ "#{var_file}" end |