Module: Kitchen::Verifier::Terraform::ConfigureInspecRunnerUser

Extended by:
Dry::Monads::Maybe::Mixin
Defined in:
lib/kitchen/verifier/terraform/configure_inspec_runner_user.rb

Overview

Configures the user for the Inspec::Runner used by the verifier to verify a group.

The default user is the transport’s :username.

See Also:

Class Method Summary collapse

Class Method Details

.call(group:, options:) ⇒ Object

Invoke the function.

Parameters:

  • group (::Hash)

    the group being verified.

  • options (::Hash)

    the Inspec::Runner’s options.



32
33
34
35
36
# File 'lib/kitchen/verifier/terraform/configure_inspec_runner_user.rb', line 32

def self.call(group:, options:)
  Maybe(group[:username]).bind do |username|
    options.store "user", username
  end
end