kitchen-terraform 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/README.md +40 -43
  5. data/lib/kitchen/{terraform/client.rb → driver.rb} +4 -5
  6. data/lib/kitchen/driver/terraform.rb +367 -300
  7. data/lib/kitchen/provisioner.rb +22 -0
  8. data/lib/kitchen/provisioner/terraform.rb +70 -13
  9. data/lib/kitchen/terraform/client_version_verifier.rb +8 -3
  10. data/lib/kitchen/terraform/config_attribute.rb +0 -5
  11. data/lib/kitchen/terraform/config_attribute/backend_configurations.rb +21 -5
  12. data/lib/kitchen/terraform/config_attribute/color.rb +15 -4
  13. data/lib/kitchen/terraform/config_attribute/command_timeout.rb +7 -4
  14. data/lib/kitchen/terraform/config_attribute/groups.rb +63 -27
  15. data/lib/kitchen/terraform/config_attribute/lock_timeout.rb +16 -7
  16. data/lib/kitchen/terraform/config_attribute/parallelism.rb +12 -4
  17. data/lib/kitchen/terraform/config_attribute/plugin_directory.rb +13 -6
  18. data/lib/kitchen/terraform/config_attribute/{directory.rb → root_module_directory.rb} +9 -8
  19. data/lib/kitchen/terraform/config_attribute/variable_files.rb +19 -2
  20. data/lib/kitchen/terraform/config_attribute/variables.rb +18 -4
  21. data/lib/kitchen/terraform/configurable.rb +0 -19
  22. data/lib/kitchen/terraform/shell_out.rb +66 -0
  23. data/lib/kitchen/terraform/version.rb +1 -1
  24. data/lib/kitchen/verifier.rb +22 -0
  25. data/lib/kitchen/verifier/terraform.rb +116 -60
  26. data/lib/kitchen/verifier/terraform/configure_inspec_runner_attributes.rb +37 -24
  27. data/lib/kitchen/verifier/terraform/enumerate_groups_and_hostnames.rb +35 -17
  28. metadata +29 -12
  29. metadata.gz.sig +3 -2
  30. data/lib/kitchen/terraform/clear_directory.rb +0 -38
  31. data/lib/kitchen/terraform/client/command.rb +0 -168
  32. data/lib/kitchen/terraform/client/options.rb +0 -275
  33. data/lib/kitchen/terraform/config_attribute/state.rb +0 -55
  34. data/lib/kitchen/terraform/config_attribute/verify_plugins.rb +0 -52
  35. data/lib/kitchen/terraform/create_directories.rb +0 -39
@@ -19,12 +19,16 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_schemas/optional_string"
20
20
  require "kitchen/terraform/file_path_config_attribute_definer"
21
21
 
22
- # The +:plugin_directory+ configuration attribute is an optional string which contains the path to the directory
23
- # containing customized Terraform provider plugins to install in place of the official Terraform provider plugins.
22
+ # This attribute contains the path to the directory which contains
23
+ # {https://www.terraform.io/docs/commands/init.html#plugin-installation customized Terraform provider plugins} to
24
+ # install in place of the official Terraform provider plugins.
25
+ #
26
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760844 Scalar}
27
+ # Required:: False
28
+ # Default:: There is no default value because any value will disable the normal Terraform plugin retrieval process.
29
+ # Example:: <code>plugin_directory: /path/to/terraform/plugins</code>
24
30
  #
25
31
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see https://www.terraform.io/docs/commands/init.html#plugin-installation Terraform: Command: init: Plugin
27
- # Installation
28
32
  module ::Kitchen::Terraform::ConfigAttribute::PluginDirectory
29
33
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
30
34
  #
@@ -46,10 +50,13 @@ module ::Kitchen::Terraform::ConfigAttribute::PluginDirectory
46
50
 
47
51
  extend ::Kitchen::Terraform::ConfigAttributeCacher
48
52
 
49
- # There is no default value because any value will disable the normal Terraform plugin retrieval process.
50
- #
51
53
  # @return [nil]
52
54
  def config_plugin_directory_default_value
53
55
  nil
54
56
  end
57
+
58
+ # @return [::String] the value converted to a flag.
59
+ def config_plugin_directory_flag
60
+ config_plugin_directory.nil? and "" or "-plugin-dir=#{config_plugin_directory}"
61
+ end
55
62
  end
@@ -19,14 +19,15 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_schemas/string"
20
20
  require "kitchen/terraform/file_path_config_attribute_definer"
21
21
 
22
- # The +:directory+ configuration attribute is an optional string which contains the path to the directory containing the
23
- # root Terraform module to be tested.
22
+ # This attribute contains the path to the directory which contains the root Terraform module to be tested.
23
+ #
24
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760844 Scalar}
25
+ # Required:: False
26
+ # Default:: The {https://en.wikipedia.org/wiki/Working_directory working directory} of the Test Kitchen process.
27
+ # Example:: <code>root_module_directory: /path/to/terraform/root/module/directory</code>
24
28
  #
25
29
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see https://www.terraform.io/docs/commands/init.html#copy-a-source-module Terraform: Command: init: Copy a Source
27
- # Module
28
- # @see https://en.wikipedia.org/wiki/Working_directory Working directory
29
- module ::Kitchen::Terraform::ConfigAttribute::Directory
30
+ module ::Kitchen::Terraform::ConfigAttribute::RootModuleDirectory
30
31
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
31
32
  #
32
33
  # @param plugin_class [::Kitchen::Configurable] A plugin class.
@@ -42,13 +43,13 @@ module ::Kitchen::Terraform::ConfigAttribute::Directory
42
43
 
43
44
  # @return [::Symbol] the symbol corresponding to the attribute.
44
45
  def self.to_sym
45
- :directory
46
+ :root_module_directory
46
47
  end
47
48
 
48
49
  extend ::Kitchen::Terraform::ConfigAttributeCacher
49
50
 
50
51
  # @return [::String] the working directory of the Test Kitchen process.
51
- def config_directory_default_value
52
+ def config_root_module_directory_default_value
52
53
  "."
53
54
  end
54
55
  end
@@ -19,10 +19,18 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_schemas/array_of_strings"
20
20
  require "kitchen/terraform/file_path_config_attribute_definer"
21
21
 
22
- # The +:variable_files+ configuration attribute is an optional array of string which represent file paths.
22
+ # This attribute comprises paths to
23
+ # {https://www.terraform.io/docs/configuration/variables.html#variable-files Terraform variable files}.
24
+ #
25
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760118 Sequince of scalars}
26
+ # Required:: False
27
+ # Example::
28
+ # _
29
+ # variable_files:
30
+ # - /path/to/first/variable/file
31
+ # - /path/to/second/variable/file
23
32
  #
24
33
  # @abstract It must be included by a plugin class in order to be used.
25
- # @see https://www.terraform.io/docs/commands/apply.html#var-file-foo Terraform: Command: apply: -var-file
26
34
  module ::Kitchen::Terraform::ConfigAttribute::VariableFiles
27
35
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
28
36
  #
@@ -48,4 +56,13 @@ module ::Kitchen::Terraform::ConfigAttribute::VariableFiles
48
56
  def config_variable_files_default_value
49
57
  []
50
58
  end
59
+
60
+ # @return [::String] the elements of the value converted to flags, joined by white space.
61
+ def config_variable_files_flags
62
+ config_variable_files
63
+ .map do |path|
64
+ "-var-file=#{path}"
65
+ end
66
+ .join " "
67
+ end
51
68
  end
@@ -19,12 +19,17 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_attribute_definer"
20
20
  require "kitchen/terraform/config_schemas/hash_of_symbols_and_strings"
21
21
 
22
- # The +:variables+ configuration attribute is an optional hash of symbols and strings comprising Terraform variables to
23
- # be overridden during the application of Terraform state changes.
22
+ # This attribute comprises {https://www.terraform.io/docs/configuration/variables.html Terraform variables}.
23
+ #
24
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760142 Mapping of scalars to scalars}
25
+ # Required:: False
26
+ # Example::
27
+ # _
28
+ # variables:
29
+ # image: image-1234
30
+ # zone: zone-5
24
31
  #
25
32
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see https://www.terraform.io/docs/commands/apply.html#var-39-foo-bar-39- Terraform: Command: apply: -var
27
- # @see https://www.terraform.io/docs/configuration/variables.html Terraform: Variables
28
33
  module ::Kitchen::Terraform::ConfigAttribute::Variables
29
34
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
30
35
  #
@@ -50,4 +55,13 @@ module ::Kitchen::Terraform::ConfigAttribute::Variables
50
55
  def config_variables_default_value
51
56
  {}
52
57
  end
58
+
59
+ # @return [::String] the elements of the value converted to flags, joined by whitespace.
60
+ def config_variables_flags
61
+ config_variables
62
+ .map do |key, value|
63
+ "-var='#{key}=#{value}'"
64
+ end
65
+ .join " "
66
+ end
53
67
  end
@@ -29,11 +29,6 @@ module ::Kitchen::Terraform::Configurable
29
29
  configurable_class.plugin_version ::Kitchen::Terraform::VERSION
30
30
  end
31
31
 
32
- # @return [::Kitchen::Driver::Terraform] the driver which will manage the lifecycle actions of the instance.
33
- def driver
34
- instance.driver
35
- end
36
-
37
32
  # Alternative implementation of Kitchen::Configurable#finalize_config! which validates the configuration before
38
33
  # attempting to expand paths.
39
34
  #
@@ -58,18 +53,4 @@ module ::Kitchen::Terraform::Configurable
58
53
 
59
54
  self
60
55
  end
61
-
62
- # Constructs a pathname under the Test Kitchen instance directory.
63
- #
64
- # @return [::String] +"<kitchen-root>/.kitchen/kitchen-terraform/<suite-platform>/<filename>"+.
65
- def instance_pathname(filename:)
66
- ::File
67
- .join(
68
- config.fetch(:kitchen_root),
69
- ".kitchen",
70
- "kitchen-terraform",
71
- instance.name,
72
- filename
73
- )
74
- end
75
56
  end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2016 New Context Services, Inc.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require "dry/monads"
18
+ require "kitchen/terraform"
19
+ require "kitchen/terraform"
20
+ require "mixlib/shellout"
21
+
22
+ # Terraform commands are run by shelling out and using the
23
+ # {https://www.terraform.io/docs/commands/index.html command-line interface}, which is assumed to be present in the
24
+ # {https://en.wikipedia.org/wiki/PATH_(variable) PATH} of the user. The shell out environment includes the
25
+ # TF_IN_AUTOMATION environment variable as specified by the
26
+ # {https://www.terraform.io/guides/running-terraform-in-automation.html#controlling-terraform-output-in-automation Running Terraform in Automation guide}.
27
+ module ::Kitchen::Terraform::ShellOut
28
+ extend ::Dry::Monads::Either::Mixin
29
+ extend ::Dry::Monads::Try::Mixin
30
+
31
+ # Runs a Terraform command.
32
+ #
33
+ # @param command [::String] the command to run.
34
+ # @param duration [::Integer] the maximum duration in seconds to run the command.
35
+ # @param logger [::Kitchen::Logger] a Test Kitchen logger to capture the output from running the command.
36
+ # @return [::Dry::Monads::Either] the result of running the command.
37
+ # @see https://rubygems.org/gems/mixlib-shellout mixlib-shellout
38
+ def self.run(command:, duration: ::Mixlib::ShellOut::DEFAULT_READ_TIMEOUT, logger:)
39
+ Try ::Mixlib::ShellOut::InvalidCommandOption do
40
+ ::Mixlib::ShellOut
41
+ .new(
42
+ "terraform #{command}",
43
+ environment: {"TF_IN_AUTOMATION" => "true"},
44
+ live_stream: logger,
45
+ timeout: duration
46
+ )
47
+ end
48
+ .bind do |shell_out|
49
+ Try(
50
+ ::Errno::EACCES,
51
+ ::Errno::ENOENT,
52
+ ::Mixlib::ShellOut::CommandTimeout,
53
+ ::Mixlib::ShellOut::ShellCommandFailed
54
+ ) do
55
+ logger.warn "Running command `#{shell_out.command}`"
56
+ shell_out.run_command
57
+ shell_out.error!
58
+ shell_out.stdout
59
+ end
60
+ end
61
+ .to_either
62
+ .or do |error|
63
+ Left "Running command resulted in failure: #{error}"
64
+ end
65
+ end
66
+ end
@@ -17,4 +17,4 @@
17
17
  require "kitchen/terraform"
18
18
 
19
19
  # The version of the kitchen-terraform gem.
20
- ::Kitchen::Terraform::VERSION = "2.1.0".freeze
20
+ ::Kitchen::Terraform::VERSION = "3.0.0".freeze
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2016 New Context Services, Inc.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require "kitchen"
18
+
19
+ # This is the namespace for Test Kitchen verifier plugins. This namespace is already defined in Test Kitchen but YARD
20
+ # requires it to be redefined here in order to include documenation from the Kitchen::Terraform namespace.
21
+ module Kitchen::Verifier
22
+ end
@@ -15,61 +15,66 @@
15
15
  # limitations under the License.
16
16
 
17
17
  require "dry/monads"
18
- require "kitchen"
18
+ require "kitchen/verifier"
19
19
  require "kitchen/terraform/config_attribute/color"
20
20
  require "kitchen/terraform/config_attribute/groups"
21
21
  require "kitchen/terraform/configurable"
22
22
  require "kitchen/verifier/inspec"
23
23
 
24
- # The kitchen-terraform verifier utilizes the InSpec infrastructure testing framework to verify the behaviour and state
25
- # of resources in the Terraform state.
24
+ # The verifier utilizes the {https://www.inspec.io/ InSpec infrastructure testing framework} to verify the behaviour and
25
+ # state of resources in the Terraform state.
26
26
  #
27
- # It is a subclass of the kitchen-inspec verifier.
27
+ # === Commands
28
28
  #
29
- # === Test Kitchen Configuration
29
+ # The following command-line commands are provided by the verifier.
30
30
  #
31
- # The configuration of the verifier is used to control the behaviour of the InSpec runner.
31
+ # ==== kitchen verify
32
32
  #
33
- # More information about the available configuration attributes is located with the respective modules.
33
+ # A Test Kitchen instance is verified by iterating through the groups and executing the associated InSpec controls in a
34
+ # manner similar to the following command-line command.
34
35
  #
35
- # Test Kitchen configuration is defined in +.kitchen.yml+ and optionally overridden in +.kitchen.local.yml+.
36
+ # inspec exec \
37
+ # [--attrs=<terraform_outputs>] \
38
+ # --backend=<ssh|local> \
39
+ # [--no-color] \
40
+ # [--controls=<group.controls>] \
41
+ # --host=<group.hostnames.current|localhost> \
42
+ # [--password=<group.password>] \
43
+ # [--port=<group.port>] \
44
+ # --profiles-path=test/integration/<suite> \
45
+ # [--user=<group.username>] \
36
46
  #
37
- # ==== Example
47
+ # === InSpec Profiles
48
+ #
49
+ # The {https://www.inspec.io/docs/reference/profiles/ InSpec profile} for a Test Kitchen suite must be defined under
50
+ # +./test/integration/<suite>/+.
51
+ #
52
+ # === Configuration Attributes
53
+ #
54
+ # The configuration attributes of the verifier control the behaviour of the InSpec runner. Within the
55
+ # {http://kitchen.ci/docs/getting-started/kitchen-yml Test Kitchen configuration file}, these attributes must be
56
+ # declared in the +verifier+ mapping along with the plugin name.
38
57
  #
39
58
  # verifier:
40
- # name: "terraform"
41
- # color: false
42
- # groups:
43
- # -
44
- # name: "group_one"
45
- # attributes:
46
- # foo: "bar"
47
- # controls:
48
- # - "biz"
49
- # hostnames: "hostnames_output"
50
- # port: "123"
51
- # username: "test-user"
52
- # -
53
- # name: "group_two"
59
+ # name: terraform
60
+ # a_configuration_attribute: some value
54
61
  #
55
- # === InSpec Profiles
62
+ # ==== color
63
+ #
64
+ # {include:Kitchen::Terraform::ConfigAttribute::Color}
56
65
  #
57
- # The InSpec profile for a Test Kitchen suite exists under +./test/integration/<Test Kitchen suite name>/+.
66
+ # ==== groups
67
+ #
68
+ # {include:Kitchen::Terraform::ConfigAttribute::Groups}
58
69
  #
59
- # @see ::Kitchen::Terraform::ConfigAttribute::Color
60
- # @see ::Kitchen::Terraform::ConfigAttribute::Groups
61
- # @see https://en.wikipedia.org/wiki/Secure_Shell Secure Shell
62
- # @see https://github.com/chef/kitchen-inspec/ kitchen-inspec
63
- # @see https://github.com/chef/kitchen-inspec/blob/master/lib/kitchen/verifier/inspec.rb kitchen-inspec: Verifier
64
- # @see https://www.inspec.io/ InSpec
65
- # @see https://www.inspec.io/docs/reference/profiles/ InSpec: Profiles
66
- # @see https://www.terraform.io/docs/state/index.html Terraform: State
67
70
  # @version 2
68
71
  class ::Kitchen::Verifier::Terraform < ::Kitchen::Verifier::Inspec
69
72
  kitchen_verifier_api_version 2
70
73
 
71
74
  include ::Dry::Monads::Either::Mixin
72
75
 
76
+ include ::Dry::Monads::Maybe::Mixin
77
+
73
78
  include ::Kitchen::Terraform::ConfigAttribute::Color
74
79
 
75
80
  include ::Kitchen::Terraform::ConfigAttribute::Groups
@@ -84,16 +89,39 @@ class ::Kitchen::Verifier::Terraform < ::Kitchen::Verifier::Inspec
84
89
  # @raise [::Kitchen::ActionFailed] if the result of the action is a failure.
85
90
  # @return [::Dry::Monads::Either] the result of the action.
86
91
  def call(state)
87
- self.class::EnumerateGroupsAndHostnames.call driver: driver, groups: config_groups do |group:, hostname:|
88
- state.store :group, group
89
- state.store :hostname, hostname
90
- info "Verifying host '#{hostname}' of group '#{group.fetch :name}'"
91
- super state
92
- end.bind do |success|
93
- Right logger.debug success
94
- end.or do |failure|
95
- raise ::Kitchen::ActionFailed, failure
96
- end
92
+ Maybe(state[:kitchen_terraform_output])
93
+ .or do
94
+ Left(
95
+ "The Test Kitchen state does not include :kitchen_terraform_output; this implies that the " \
96
+ "kitchen-terraform provisioner has not successfully converged"
97
+ )
98
+ end
99
+ .bind do |output|
100
+ ::Kitchen::Verifier::Terraform::EnumerateGroupsAndHostnames
101
+ .call(
102
+ groups: config_groups,
103
+ output: ::Kitchen::Util.stringified_hash(output)
104
+ ) do |group:, hostname:|
105
+ state
106
+ .store(
107
+ :kitchen_terraform_group,
108
+ group
109
+ )
110
+ state
111
+ .store(
112
+ :kitchen_terraform_hostname,
113
+ hostname
114
+ )
115
+ info "Verifying host '#{hostname}' of group '#{group.fetch :name}'"
116
+ super state
117
+ end
118
+ end
119
+ .or do |failure|
120
+ raise(
121
+ ::Kitchen::ActionFailed,
122
+ failure
123
+ )
124
+ end
97
125
  end
98
126
 
99
127
  private
@@ -105,23 +133,51 @@ class ::Kitchen::Verifier::Terraform < ::Kitchen::Verifier::Inspec
105
133
  # @return [::Hash] Inspec Runner options.
106
134
  # @see https://github.com/chef/inspec/blob/master/lib/inspec/runner.rb ::Inspec::Runner
107
135
  def runner_options(transport, state = {}, platform = nil, suite = nil)
108
- super(transport, state, platform, suite).tap do |options|
109
- self.class::ConfigureInspecRunnerBackend.call hostname: state.fetch(:hostname), options: options
110
- self.class::ConfigureInspecRunnerHost.call hostname: state.fetch(:hostname), options: options
111
- self.class::ConfigureInspecRunnerPort.call group: state.fetch(:group), options: options
112
- self
113
- .class::ConfigureInspecRunnerSSHKey
114
- .call(
115
- group: state.fetch(:group),
116
- options: options
117
- )
118
- self.class::ConfigureInspecRunnerUser.call group: state.fetch(:group), options: options
119
- self.class::ConfigureInspecRunnerAttributes
120
- .call(driver: driver, group: state.fetch(:group), terraform_state: driver[:state]).bind do |attributes|
121
- config.store :attributes, attributes
122
- end
123
- self.class::ConfigureInspecRunnerControls.call group: state.fetch(:group), options: options
124
- end
136
+ super(transport, state, platform, suite)
137
+ .tap do |options|
138
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerBackend
139
+ .call(
140
+ hostname: state.fetch(:kitchen_terraform_hostname),
141
+ options: options
142
+ )
143
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerHost
144
+ .call(
145
+ hostname: state.fetch(:kitchen_terraform_hostname),
146
+ options: options
147
+ )
148
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerPort
149
+ .call(
150
+ group: state.fetch(:kitchen_terraform_group),
151
+ options: options
152
+ )
153
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerSSHKey
154
+ .call(
155
+ group: state.fetch(:kitchen_terraform_group),
156
+ options: options
157
+ )
158
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerUser
159
+ .call(
160
+ group: state.fetch(:kitchen_terraform_group),
161
+ options: options
162
+ )
163
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerAttributes
164
+ .call(
165
+ group: state.fetch(:kitchen_terraform_group),
166
+ output: ::Kitchen::Util.stringified_hash(state.fetch(:kitchen_terraform_output))
167
+ )
168
+ .bind do |attributes|
169
+ options
170
+ .store(
171
+ :attributes,
172
+ attributes
173
+ )
174
+ end
175
+ ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerControls
176
+ .call(
177
+ group: state.fetch(:kitchen_terraform_group),
178
+ options: options
179
+ )
180
+ end
125
181
  end
126
182
  end
127
183