Module: Kitchen::Terraform::Configurable
- Included in:
- Driver::Terraform, Provisioner::Terraform, Kitchen::Transport::Terraform, Verifier::Terraform
- Defined in:
- lib/kitchen/terraform/configurable.rb
Overview
Refinements to Kitchen::Configurable. This class implements the interface of Kitchen::Configurable which requires the following Reek suppressions: :reek:MissingSafeMethod { exclude: [ finalize_config! ] }
Class Method Summary collapse
-
.included(configurable_class) ⇒ self
A callback to define the plugin version which is invoked when this module is included in a plugin class.
Instance Method Summary collapse
-
#finalize_config!(instance) ⇒ self
#finalize_config! invokes the super implementation and then defines the workspace name and version requirement.
Class Method Details
.included(configurable_class) ⇒ self
A callback to define the plugin version which is invoked when this module is included in a plugin class.
32 33 34 35 |
# File 'lib/kitchen/terraform/configurable.rb', line 32 def self.included(configurable_class) ::Kitchen::Terraform::Version.assign_plugin_version configurable_class: configurable_class self end |
Instance Method Details
#finalize_config!(instance) ⇒ self
#finalize_config! invokes the super implementation and then defines the workspace name and version requirement.
42 43 44 45 46 |
# File 'lib/kitchen/terraform/configurable.rb', line 42 def finalize_config!(instance) super instance self.version_requirement = ::Gem::Requirement.new ">= 0.11.4", "< 2.0.0" self.workspace_name = "kitchen-terraform-#{::Shellwords.escape instance.name}" end |