Module: Kitchen::Verifier::Terraform::ConfigureInspecRunnerControls

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

Overview

Configures a group’s InSpec profile controls to be inclued by the Inspec::Runner used by the verifier.

If a group omits :controls or if :controls is empty then all of the profile’s controls will be included.

Class Method Summary collapse

Class Method Details

.call(group:, options:) ⇒ Object

Invokes the function

Parameters:

  • group (::Hash)

    the group being verified.

  • options (:Hash)

    the verifier’s Inspec::Runner’s options.



34
35
36
37
38
# File 'lib/kitchen/verifier/terraform/configure_inspec_runner_controls.rb', line 34

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