lib/kitchen/terraform/command/version.rb
# The command is run by shelling out in an environment which is optimized for automating Terraform.
#
# @raise [::Kitchen::Terraform::Error] if the result of running the command is a failure.
# @return [::Kitchen::Terraform::Command::Version] an instance initialized with the output of the command.
# @yieldparam version [::Kitchen::Terraform::Command::Version] an instance initialized with the output of the
#   command.
The command is run by shelling out in an environment which is optimized for automating Terraform.
The command is run by shelling out in an environment which is optimized for automating Terraform .
def run
            new(
              run_command(
                "terraform version",
                environment: {
                  "LC_ALL" => nil,
                  "TF_IN_AUTOMATION" => "true",
                  "TF_WARN_OUTPUT_ERRORS" => "true",
                },
              )
            ).tap do |version|
              yield version: version
            end
          rescue ::Kitchen::ShellOut::ShellCommandFailed, ::Kitchen::Error => error
            raise ::Kitchen::Terraform::Error, error.message
          end
def run new ( run_command ( "terraform version" , environment : { "LC_ALL" => nil , "TF_IN_AUTOMATION" => "true" , "TF_WARN_OUTPUT_ERRORS" => "true" , } , ) ) . tap do | version | yield version : version end rescue :: Kitchen :: ShellOut :: ShellCommandFailed , :: Kitchen :: Error => error raise :: Kitchen :: Terraform :: Error , error . message end
The command is run by shelling out in an environment which is optimized for automating Terraform.
The command is run by shelling out in an environment which is optimized for automating Terraform .
an instance initialized with the output of the command.
an instance initialized with the output of the command .
::Kitchen::Terraform::Command::Version
[::Kitchen::Terraform::Error] if the result of running the command is a failure.
[ :: Kitchen :: Terraform :: Error ] if the result of running the command is a failure .
version
<not_specific>
an instance initialized with the output of the command.
an instance initialized with the output of the command .