Class: Kitchen::Terraform::VerifyVersionRescueStrategy::Permissive

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/terraform/verify_version_rescue_strategy/permissive.rb

Overview

Permissive is the class of objects which provide a permissive rescue strategy to handle a failure to verify the Terraform client version.

Instance Method Summary collapse

Constructor Details

#initialize(logger:) ⇒ Kitchen::Terraform::VerifyVersionRescueStrategy::Permissive

#initialize prepares a new instance of the class.

Parameters:

  • logger (Kitchen::Logger)

    a logger to log messages.



38
39
40
41
42
# File 'lib/kitchen/terraform/verify_version_rescue_strategy/permissive.rb', line 38

def initialize(logger:)
  self.logger = logger
  self.message = "Verifying the Terraform client version failed. Set `driver.verify_version: true` to " \
                 "upgrade this warning to an error."
end

Instance Method Details

#callself

#call warns the user that the version is unsupported.

Returns:

  • (self)


28
29
30
31
32
# File 'lib/kitchen/terraform/verify_version_rescue_strategy/permissive.rb', line 28

def call
  logger.warn message

  self
end