Module: Kitchen::Terraform::ConfigAttribute::Client
- Extended by:
- Kitchen::Terraform::ConfigAttributeCacher
- Included in:
- Driver::Terraform
- Defined in:
- lib/kitchen/terraform/config_attribute/client.rb
Overview
This attribute contains the pathname of the Terraform client to be used by Kitchen-Terraform.
If the value is not an absolute pathname or a relative pathname then Kitchen-Terraform will attempt to find the value in the directories of the ) PATH.
The pathname of any executable file which implements the interfaces of the following Terraform client commands may be specified: apply; destroy; get; init; validate; workspace.
- Type
- Required
-
False
- Default
-
terraform
- Example
-
client: /usr/local/bin/terraform
- Example
-
client: ./bin/terraform
- Example
-
client: terraform
Class Method Summary collapse
-
.included(plugin_class) ⇒ self
.included is a callback to define the configuration attribute which is invoked when this module is included in a plugin class.
-
.to_sym ⇒ Symbol
The symbol corresponding to this attribute.
Instance Method Summary collapse
-
#config_client_default_value ⇒ String
</code>“terraform”</code>.
Methods included from Kitchen::Terraform::ConfigAttributeCacher
Class Method Details
.included(plugin_class) ⇒ self
.included is a callback to define the configuration attribute which is invoked when this module is included in a plugin class.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/kitchen/terraform/config_attribute/client.rb', line 47 def included(plugin_class) ::Kitchen::Terraform::ConfigAttributeDefiner.new( attribute: self, schema: ::Kitchen::Terraform::ConfigSchemas::String, ).define plugin_class: plugin_class plugin_class. to_sym do |plugin| !::TTY::Which.exist? plugin[to_sym] end self end |
.to_sym ⇒ Symbol
Returns the symbol corresponding to this attribute.
60 61 62 |
# File 'lib/kitchen/terraform/config_attribute/client.rb', line 60 def to_sym :client end |
Instance Method Details
#config_client_default_value ⇒ String
Returns </code>“terraform”</code>.
68 69 70 |
# File 'lib/kitchen/terraform/config_attribute/client.rb', line 68 def config_client_default_value "terraform" end |