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
@@ -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 provisioner 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::Provisioner
22
+ end
@@ -14,36 +14,93 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- require "kitchen"
17
+ require "kitchen/provisioner"
18
18
  require "kitchen/terraform/configurable"
19
19
 
20
- # The design of the provisioner is unconventional compared to other Test Kitchen provisioner plugins. Since Terraform
21
- # creates and provisions resources when applying an execution plan, managed by the driver, the provisioner simply
22
- # proxies the driver's create action to apply any changes to the existing Terraform state.
20
+ # The provisioner utilizes the driver to apply changes to the Terraform state in order to reach the desired
21
+ # configuration of the root module.
23
22
  #
24
- # === Configuration
23
+ # === Commands
25
24
  #
26
- # ==== Example .kitchen.yml snippet
25
+ # The following command-line actions are provided by the provisioner.
26
+ #
27
+ # ==== kitchen converge
28
+ #
29
+ # A Test Kitchen instance is converged through the following steps.
30
+ #
31
+ # ===== Selecting the Test Terraform Workspace
32
+ #
33
+ # terraform workspace select kitchen-terraform-<instance>
34
+ #
35
+ # ===== Updating the Terraform Dependency Modules
36
+ #
37
+ # terraform get -update <directory>
38
+ #
39
+ # ===== Validating the Terraform Root Module
40
+ #
41
+ # terraform validate \
42
+ # -check-variables=true \
43
+ # [-no-color] \
44
+ # [-var=<variables.first>...] \
45
+ # [-var-file=<variable_files.first>...] \
46
+ # <directory>
47
+ #
48
+ # ===== Applying the Terraform State Changes
49
+ #
50
+ # terraform apply\
51
+ # -lock=true \
52
+ # -lock-timeout=<lock_timeout>s \
53
+ # -input=false \
54
+ # -auto-approve=true \
55
+ # [-no-color] \
56
+ # -parallelism=<parallelism> \
57
+ # -refresh=true \
58
+ # [-var=<variables.first>...] \
59
+ # [-var-file=<variable_files.first>...] \
60
+ # <directory>
61
+ #
62
+ # ===== Retrieving the Terraform Output
63
+ #
64
+ # terraform output -json
65
+ #
66
+ # === Configuration Attributes
67
+ #
68
+ # The provisioner has no configuration attributes, but the +provisioner+ mapping must be declared with the plugin name
69
+ # within the {http://kitchen.ci/docs/getting-started/kitchen-yml Test Kitchen configuration file}.
27
70
  #
28
71
  # provisioner:
29
72
  # name: terraform
30
73
  #
31
- # @see ::Kitchen::Driver::Terraform
32
- # @see https://www.terraform.io/docs/commands/plan.html Terraform execution plan
33
- # @see https://www.terraform.io/docs/state/index.html Terraform state
74
+ # @example Describe the converge command
75
+ # kitchen help converge
76
+ # @example Converge a Test Kitchen instance
77
+ # kitchen converge default-ubuntu
34
78
  # @version 2
35
79
  class ::Kitchen::Provisioner::Terraform < ::Kitchen::Provisioner::Base
36
80
  kitchen_provisioner_api_version 2
37
81
 
38
82
  include ::Kitchen::Terraform::Configurable
39
83
 
40
- # Proxies the driver's create action.
84
+ # Converges a Test Kitchen instance.
41
85
  #
42
- # @example
43
- # `kitchen converge suite-name`
44
86
  # @param state [::Hash] the mutable instance and provisioner state.
45
87
  # @raise [::Kitchen::ActionFailed] if the result of the action is a failure.
46
88
  def call(state)
47
- instance.driver.create state
89
+ instance
90
+ .driver
91
+ .apply
92
+ .fmap do |output|
93
+ state
94
+ .store(
95
+ :kitchen_terraform_output,
96
+ output
97
+ )
98
+ end
99
+ .or do |failure|
100
+ raise(
101
+ ::Kitchen::ActionFailed,
102
+ failure
103
+ )
104
+ end
48
105
  end
49
106
  end
@@ -40,9 +40,9 @@ class ::Kitchen::Terraform::ClientVersionVerifier
40
40
  )
41
41
  ).bind do |version|
42
42
  if requirement.satisfied_by? version
43
- Right "Terraform version #{version} is supported"
43
+ Right "Terraform v#{version} is supported"
44
44
  else
45
- Left "Terraform version #{version} is not supported; upgrade to Terraform version ~> 0.10.2"
45
+ Left "Terraform v#{version} is not supported; install Terraform ~> v0.11.0"
46
46
  end
47
47
  end
48
48
  end
@@ -52,6 +52,11 @@ class ::Kitchen::Terraform::ClientVersionVerifier
52
52
  attr_reader :requirement
53
53
 
54
54
  def initialize
55
- @requirement = ::Gem::Requirement.new "~> 0.10.2"
55
+ @requirement =
56
+ ::Gem::Requirement
57
+ .new(
58
+ ">= 0.10.2",
59
+ "< 0.12.0"
60
+ )
56
61
  end
57
62
  end
@@ -20,9 +20,4 @@ require "kitchen/terraform"
20
20
  #
21
21
  # @abstract It defines the interface for configuration attributes to implement.
22
22
  module ::Kitchen::Terraform::ConfigAttribute
23
- def self.default_value(_plugin:)
24
- end
25
-
26
- def self.to_sym
27
- end
28
23
  end
@@ -19,16 +19,23 @@ 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 +:backend_configurations+ configuration attribute is an optional hash of symobls and strings comprising Terraform
23
- # backend configuration arguments to complete a partial backend.
22
+ # This attribute comprises {https://www.terraform.io/docs/backends/config.html Terraform backend configuration}
23
+ # arguments to complete a
24
+ # {https://www.terraform.io/docs/backends/config.html#partial-configuration partial backend configuration}.
25
+ #
26
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760142 Mapping of scalars to scalars}
27
+ # Required:: False
28
+ # Example::
29
+ # _
30
+ # backend_configurations:
31
+ # address: demo.consul.io
32
+ # path: example_app/terraform_state
24
33
  #
25
34
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see https://www.terraform.io/docs/backends/config.html#partial-configuration Terraform: Backend Configuration:
27
- # Partial Configuration
28
35
  module ::Kitchen::Terraform::ConfigAttribute::BackendConfigurations
29
36
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
30
37
  #
31
- # @param plugin_class [::Kitchen::Configurable] A plugin class.
38
+ # @param plugin_class [::Kitchen::Configurable] a plugin class.
32
39
  # @return [void]
33
40
  def self.included(plugin_class)
34
41
  ::Kitchen::Terraform::ConfigAttributeDefiner
@@ -50,4 +57,13 @@ module ::Kitchen::Terraform::ConfigAttribute::BackendConfigurations
50
57
  def config_backend_configurations_default_value
51
58
  {}
52
59
  end
60
+
61
+ # @return [::String] the elements of the value converted to flags, joined by white space.
62
+ def config_backend_configurations_flags
63
+ config_backend_configurations
64
+ .map do |key, value|
65
+ "-backend-config='#{key}=#{value}'"
66
+ end
67
+ .join " "
68
+ end
53
69
  end
@@ -20,11 +20,18 @@ require "kitchen/terraform/config_attribute_cacher"
20
20
  require "kitchen/terraform/config_attribute_definer"
21
21
  require "kitchen/terraform/config_schemas/boolean"
22
22
 
23
- # The +:color+ configuration attribute is an optional boolean which toggles colored output from the Terraform Client
24
- # commands.
23
+ # This attribute toggles colored output from systems invoked by the plugin.
24
+ #
25
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2803629 Boolean}
26
+ # Required:: False
27
+ # Default:: If a {https://en.wikipedia.org/wiki/Terminal_emulator terminal emulator} is associated with the Test Kitchen
28
+ # process then +true+; else +false+.
29
+ # Example:: <code>color: false</code>
30
+ # Caveat:: This attribute does not toggle colored output from the Test Kitchen core, though it does use the same default
31
+ # logic. To toggle colored output from the core, the +--color+ and +--no-color+ command-line flags must be
32
+ # used.
25
33
  #
26
34
  # @abstract It must be included by plugin class in order to be used.
27
- # @see ::Kitchen::Terraform::Client::Command
28
35
  module ::Kitchen::Terraform::ConfigAttribute::Color
29
36
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
30
37
  #
@@ -49,8 +56,12 @@ module ::Kitchen::Terraform::ConfigAttribute::Color
49
56
  # The default value depends on the presence of a terminal device associated with the Test Kitchen process.
50
57
  #
51
58
  # @return [Boolean] if a terminal device is associated then +true+; else +false+.
52
- # @see https://en.wikipedia.org/wiki/Terminal_emulator Terminal emulator
53
59
  def config_color_default_value
54
60
  ::Kitchen.tty?
55
61
  end
62
+
63
+ # @return [::String] the toggle converted to a flag.
64
+ def config_color_flag
65
+ config_color and "" or "-no-color"
66
+ end
56
67
  end
@@ -19,11 +19,14 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_attribute_definer"
20
20
  require "kitchen/terraform/config_schemas/integer"
21
21
 
22
- # The +:command_timeout+ configuration attribute is an optional integer which represents the number of seconds to wait
23
- # for the Terraform Client commands to finish.
22
+ # This attribute controls the number of seconds that the plugin will wait for Terraform commands to finish running.
23
+ #
24
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2803828 Integer}
25
+ # Required:: False
26
+ # Default:: +600+
27
+ # Example:: <code>command_timeout: 1200</code>
24
28
  #
25
29
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see ::Kitchen::Terraform::Client::Command
27
30
  module ::Kitchen::Terraform::ConfigAttribute::CommandTimeout
28
31
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
29
32
  #
@@ -45,7 +48,7 @@ module ::Kitchen::Terraform::ConfigAttribute::CommandTimeout
45
48
 
46
49
  extend ::Kitchen::Terraform::ConfigAttributeCacher
47
50
 
48
- # @return [::Integer] 600 seconds.
51
+ # @return [::Integer] 600.
49
52
  def config_command_timeout_default_value
50
53
  600
51
54
  end
@@ -19,62 +19,98 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_attribute_definer"
20
20
  require "kitchen/terraform/config_schemas/groups"
21
21
 
22
- # The +:groups+ configuration attribute is an optional array including hashes comprising properties to manage the
23
- # execution of InSpec profiles against different resources in the Terraform state.
22
+ # This attribute is an optional array including hashes comprising properties to manage the execution of
23
+ # {https://www.inspec.io/docs/reference/profiles/ InSpec profiles} against different resources in the Terraform state.
24
24
  #
25
- # === Hash Keys
25
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760193 Sequence of mappings}
26
+ # Required:: False
27
+ # Example::
28
+ # _
29
+ # groups:
30
+ # -
31
+ # name: a_group
32
+ #
33
+ # === Mapping Keys
34
+ #
35
+ # These keys must be declared in each of the mappings in the sequence.
26
36
  #
27
37
  # ==== name
28
38
  #
29
- # A required string which contains the name of the group.
39
+ # This key contains the name of the group to be used for logging purposes.
40
+ #
41
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760844 Scalar}
42
+ # Required:: True
43
+ # Example:: <code>name: a_group</code>
30
44
  #
31
45
  # ==== attributes
32
46
  #
33
- # An optional hash of symbols and strings which associates the names of InSpec profile attributes to the names of
34
- # Terraform outputs.
47
+ # This key comprises associations of the names of
48
+ # {https://www.inspec.io/docs/reference/profiles/#profile-attributes InSpec profile attributes} with the names of
49
+ # {https://www.terraform.io/docs/configuration/outputs.html Terraform outputs}. The values of the outputs will be
50
+ # exposed as attributes when InSpec executes.
35
51
  #
36
- # The attributes will be associated with the values of the outputs when InSpec runs.
52
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760142 Mapping of scalars to scalars}
53
+ # Required:: False
54
+ # Example::
55
+ # _
56
+ # attributes:
57
+ # an_attribute: an_output
58
+ # Caveat:: As all Terraform outputs are associated with equivalently named InSpec profile attributes by default, this
59
+ # key is only necessary to provide alternative attribute names.
37
60
  #
38
61
  # ==== controls
39
62
  #
40
- # An optional array of strings which contain the names of controls to exclusively include from the InSpec profile of the
41
- # Test Kitchen suite.
63
+ # This key comprises the names of {https://www.inspec.io/docs/reference/dsl_inspec/ InSpec controls} to exclusively
64
+ # include from the InSpec profile of the Test Kitchen suite.
42
65
  #
43
- # ==== hostnames
66
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760118 Sequince of scalars}
67
+ # Required:: False
68
+ # Example::
69
+ # _
70
+ # controls:
71
+ # - first_control
72
+ # - third_control
44
73
  #
45
- # An optional string which contains the name of a Terraform output.
74
+ # ==== hostnames
46
75
  #
47
- # The output must be of type String or Array and must contain one or more hostnames that will be the targets of the
48
- # InSpec profile of the Test Kitchen suite.
76
+ # This key contains the name of a Terraform output.
49
77
  #
50
- # If this key is omitted then localhost will be the target of the profile.
78
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760844 Scalar}
79
+ # Required:: False
80
+ # Example:: <code>hostnames: an_output</code>
81
+ # Caveat:: The output must be of type String or Array and must contain one or more hostnames that will be the targets of
82
+ # the InSpec profile of the Test Kitchen suite. If this key is omitted then +"localhost"+ will be the target of
83
+ # the profile.
51
84
  #
52
85
  # ==== port
53
86
  #
54
- # An optional integer which represents the port to use when connecting with Secure Shell (SSH) to the hosts of the
55
- # group.
87
+ # This key contains the port to use when connecting with {https://en.wikipedia.org/wiki/Secure_Shell Secure Shell (SSH)}
88
+ # to the hosts of the group.
56
89
  #
57
- # If this key is omitted then the port of the Test Kitchen SSH Transport will be used.
90
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2803828 Integer}
91
+ # Required:: False
92
+ # Example:: <code>port: 1234</code>
93
+ # Caveat:: If this key is omitted then the port of the Test Kitchen SSH transport will be used.
58
94
  #
59
95
  # ==== ssh_key
60
96
  #
61
- # An optional string which contains the path to the private SSH key to use when connecting with SSH to the hosts of the
62
- # group.
97
+ # This key contains the path to a private SSH key to use when connecting with SSH to the hosts of the group.
63
98
  #
64
- # If this key is omitted then the private SSH key of the Test Kitchen SSH Transport will be used.
99
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760844 Scalar}
100
+ # Required:: False
101
+ # Example:: <code>ssh_key: /path/to/an/ssh/key</code>
102
+ # Caveat:: If this key is omitted then the private SSH key of the Test Kitchen SSH Transport will be used.
65
103
  #
66
104
  # ==== username
67
105
  #
68
- # An optional string which contains the username to use when connecting with SSH to the hosts of the group.
106
+ # This key contains the username to use when connecting with SSH to the hosts of the group.
69
107
  #
70
- # If this key is omitted then the username of the Test Kitcen SSH Transport will be used.
108
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2760844 Scalar}
109
+ # Required:: False
110
+ # Example:: <code>ssh_key: /path/to/an/ssh/key</code>
111
+ # Caveat:: If this key is omitted then the username of the Test Kitcen SSH Transport will be used.
71
112
  #
72
113
  # @abstract It must be included by a plugin class in order to be used.
73
- # @see https://github.com/test-kitchen/test-kitchen/blob/master/lib/kitchen/transport/ssh.rb Test Kitchen: SSH Transport
74
- # @see https://www.inspec.io/docs/reference/dsl_inspec/ InSpec: Controls
75
- # @see https://www.inspec.io/docs/reference/profiles/ InSpec: Profiles
76
- # @see https://www.terraform.io/docs/configuration/outputs.html Terraform: Output Variables
77
- # @see https://www.terraform.io/docs/state/index.html Terraform: State
78
114
  module ::Kitchen::Terraform::ConfigAttribute::Groups
79
115
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
80
116
  #
@@ -17,13 +17,17 @@
17
17
  require "kitchen/terraform/config_attribute"
18
18
  require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_attribute_definer"
20
- require "kitchen/terraform/config_schemas/string"
20
+ require "kitchen/terraform/config_schemas/integer"
21
21
 
22
- # The +:lock_timeout+ configuration attribute is an optional string which contains the duration to wait for a lock on
23
- # the Terraform state to be obtained.
22
+ # This attribute controls the number of seconds that Terraform will wait for a lock on the state to be obtained during
23
+ # {https://www.terraform.io/docs/state/locking.html operations related to state}.
24
+ #
25
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2803828 Integer}
26
+ # Required:: False
27
+ # Default:: +0+
28
+ # Example:: <code>lock_timeout: 10</code>
24
29
  #
25
30
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see https://www.terraform.io/docs/commands/apply.html#lock-timeout-0s Terraform: Command: apply: -lock-timeout
27
31
  module ::Kitchen::Terraform::ConfigAttribute::LockTimeout
28
32
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
29
33
  #
@@ -33,7 +37,7 @@ module ::Kitchen::Terraform::ConfigAttribute::LockTimeout
33
37
  ::Kitchen::Terraform::ConfigAttributeDefiner
34
38
  .new(
35
39
  attribute: self,
36
- schema: ::Kitchen::Terraform::ConfigSchemas::String
40
+ schema: ::Kitchen::Terraform::ConfigSchemas::Integer
37
41
  )
38
42
  .define plugin_class: plugin_class
39
43
  end
@@ -45,8 +49,13 @@ module ::Kitchen::Terraform::ConfigAttribute::LockTimeout
45
49
 
46
50
  extend ::Kitchen::Terraform::ConfigAttributeCacher
47
51
 
48
- # @return [::String] 0 seconds.
52
+ # @return [::Integer] 0.
49
53
  def config_lock_timeout_default_value
50
- "0s"
54
+ 0
55
+ end
56
+
57
+ # @return [::String] the value converted to a flag.
58
+ def config_lock_timeout_flag
59
+ "-lock-timeout=#{config_lock_timeout}s"
51
60
  end
52
61
  end
@@ -19,12 +19,15 @@ require "kitchen/terraform/config_attribute_cacher"
19
19
  require "kitchen/terraform/config_attribute_definer"
20
20
  require "kitchen/terraform/config_schemas/integer"
21
21
 
22
- # The +:parallelism+ configuration attribute is an optional integer which represents the maximum number of concurrent
23
- # operations to allow while walking the resource graph for the Terraform Client apply command.
22
+ # This attribute controls the number of concurrent operations to use while Terraform
23
+ # {https://www.terraform.io/docs/internals/graph.html#walking-the-graph walks the resource graph}.
24
+ #
25
+ # Type:: {http://www.yaml.org/spec/1.2/spec.html#id2803828 Integer}
26
+ # Required:: False
27
+ # Default:: +10+
28
+ # Example:: <code>parallelism: 50</code>
24
29
  #
25
30
  # @abstract It must be included by a plugin class in order to be used.
26
- # @see https://www.terraform.io/docs/commands/apply.html#parallelism-n Terraform: Command: apply: -parallelism
27
- # @see https://www.terraform.io/docs/internals/graph.html Terraform: Resource Graph
28
31
  module ::Kitchen::Terraform::ConfigAttribute::Parallelism
29
32
  # A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
30
33
  #
@@ -50,4 +53,9 @@ module ::Kitchen::Terraform::ConfigAttribute::Parallelism
50
53
  def config_parallelism_default_value
51
54
  10
52
55
  end
56
+
57
+ # @return [::String] the value converted to a flag.
58
+ def config_parallelism_flag
59
+ "-parallelism=#{config_parallelism}"
60
+ end
53
61
  end