Module: Kitchen::Terraform::Configurable
- Included in:
- Driver::Terraform, Provisioner::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.
43 44 45 46 47 |
# File 'lib/kitchen/terraform/configurable.rb', line 43 def finalize_config!(instance) super instance self.version_requirement = ::Gem::Requirement.new ">= 0.11.4", "< 0.13.0" self.workspace_name = "kitchen-terraform-#{::Shellwords.escape instance.name}" end |