Class: Kitchen::Terraform::CommandFlag::LockTimeout

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

Overview

LockTimeout is the class of objects which control the duration in which to retry the acquisition of the state lock.

Instance Method Summary collapse

Constructor Details

#initialize(duration:) ⇒ Kitchen::Terraform::CommandFlag::LockTimeout

#initialize prepares a new instance of the class.

Parameters:

  • duration (Integer)

    the duration in seconds.



27
28
29
# File 'lib/kitchen/terraform/command_flag/lock_timeout.rb', line 27

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

Instance Method Details

#to_sString

Returns the backend configuration flag.

Returns:

  • (String)

    the backend configuration flag.



32
33
34
# File 'lib/kitchen/terraform/command_flag/lock_timeout.rb', line 32

def to_s
  "-lock-timeout=#{duration}s"
end