Warning
With the announcement of a native test framework with Terraform 1.6 and the announcement of deprecating Kitchen-Terraform we have archived this repository.
Kitchen-Terraform provides a set of Kitchen plugins that enable the use of Kitchen to converge a Terraform configuration and verify the resulting infrastructure systems with InSpec controls.
Required The name of the command to run. Default "help"
.
More Examples:
converge [INSTANCE|REGEXP|all] # Change instance state to converge. Use a provisioner to configure...
create [INSTANCE|REGEXP|all] # Change instance state to create. Start one or more instances
destroy [INSTANCE|REGEXP|all] # Change instance state to destroy. Delete all information for one ...
help [COMMAND] # Describe available commands or one specific command
test [INSTANCE|REGEXP|all] # Test (destroy, create, converge, setup, verify and destroy) one o...
verify [INSTANCE|REGEXP|all] # Change instance state to verify. Run automated tests on one or mo...
version # Print Kitchen's version information
Optional The name of the instance to run the command on. You can run kitchen list
to see the available instances.
This is useful when you have multiple instances in your .kitchen.yml
file and you want to run the command on a specific instance for
example if you need to destroy a specific instance when dealing with more complex test scenarios.
- name: Kitchen Converge
uses: osinfra-io/github-kitchen-terraform-action@v2.5.0
with:
kitchen-command: "converge"
- name: Kitchen Destroy
uses: osinfra-io/github-kitchen-terraform-action@v2.5.0
with:
kitchen-command: "destroy"
kitchen-instance: "default-test-gcp"
An example called workflow can be found here.