Class: Kitchen::Provisioner::Terraform

Inherits:
Base
  • Object
show all
Includes:
Terraform::Configurable
Defined in:
lib/kitchen/provisioner/terraform.rb

Overview

The design of the provisioner is unconventional compared to other Test Kitchen provisioner plugins. Since Terraform creates and provisions resources when applying an execution plan, managed by the driver, the provisioner simply proxies the driver’s create action to apply any changes to the existing Terraform state.

Configuration

Example .kitchen.yml snippet

provisioner:
  name: terraform

Instance Method Summary collapse

Methods included from Terraform::Configurable

#driver, #finalize_config!, included, #instance_pathname

Instance Method Details

#call(state) ⇒ Object

Proxies the driver’s create action.

Examples:

`kitchen converge suite-name`

Parameters:

  • state (::Hash)

    the mutable instance and provisioner state.

Raises:

  • (::Kitchen::ActionFailed)

    if the result of the action is a failure.



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

def call(state)
  instance.driver.create state
end