Module: Kitchen::Terraform::ConfigAttribute::RootModuleDirectory

Extended by:
Kitchen::Terraform::ConfigAttributeCacher
Included in:
Driver::Terraform, Kitchen::Transport::Terraform
Defined in:
lib/kitchen/terraform/config_attribute/root_module_directory.rb

Overview

This attribute contains the path to the directory which contains the root Terraform module to be tested.

Type

Scalar

Required

False

Default

The working directory of the Test Kitchen process.

Example

root_module_directory: /path/to/terraform/root/module/directory

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Kitchen::Terraform::ConfigAttributeCacher

define_cache, extended

Class Method Details

.included(plugin_class) ⇒ void

This method returns an undefined value.

A callback to define the configuration attribute which is invoked when this module is included in a plugin class.

Parameters:

  • plugin_class (Kitchen::Configurable)

    A plugin class.



38
39
40
41
42
43
# File 'lib/kitchen/terraform/config_attribute/root_module_directory.rb', line 38

def included(plugin_class)
  ::Kitchen::Terraform::FilePathConfigAttributeDefiner.new(
    attribute: self,
    schema: ::Kitchen::Terraform::ConfigAttributeContract::String.new,
  ).define plugin_class: plugin_class
end

.to_symSymbol

Returns the symbol corresponding to the attribute.

Returns:

  • (Symbol)

    the symbol corresponding to the attribute.



46
47
48
# File 'lib/kitchen/terraform/config_attribute/root_module_directory.rb', line 46

def to_sym
  :root_module_directory
end

Instance Method Details

#config_root_module_directory_default_valueString

Returns the working directory of the Test Kitchen process.

Returns:

  • (String)

    the working directory of the Test Kitchen process.



54
55
56
# File 'lib/kitchen/terraform/config_attribute/root_module_directory.rb', line 54

def config_root_module_directory_default_value
  "."
end