Automated tests for your infrastructure code.
Terratest is a Go library that provides patterns and helper functions for testing infrastructure, with 1st-class support for Terraform, Packer, Docker, Kubernetes, AWS, GCP, and more. Let's Get StartedTest infrastructure code with Terratest in 4 steps
Create a file ending in
_test.go
and run tests with the go test command. E.g.,
go test my_test.go
.
Use Terratest to execute your real IaC tools (e.g., Terraform, Packer, etc.)
to deploy real infrastructure (e.g., servers) in a real environment (e.g., AWS).
Use the tools built into Terratest to validate that the infrastructure
works correctly in that environment by making HTTP requests, API calls, SSH connections, etc.
Undeploy everything at the end of the test.
Test with Terratest
Loading...
Loading...
Learn more:
Loading...
Loading...
Learn more:
Loading...
Loading...
Learn more:
Loading...
Loading...
Learn more:
Loading...
Loading...
Loading...
Learn more:
Loading...
Loading...
Learn more:
Loading...
Loading...
Learn more:
Loading...
Loading...
Loading...
Loading...
Learn more:
Loading...
Loading...
Loading...
Loading...
Learn more:
Loading...
Loading...
Loading...
View on GitHub:
github.com/gruntwork-io/terratest/modules/azure/compute.go
Watch:
How to test infrastructure code:
How to test infrastructure code:
automated testing for Terraform,
Kubernetes, Docker, Packer and more
The talk is a step-by-step, live-coding class on how to write automated tests for infrastructure code, including the code you write for use with tools such as Terraform, Kubernetes, Docker, and Packer. Topics covered include unit tests, integration tests, end-to-end tests, test parallelism, retries, error handling, static analysis, and more.
Check out
the video and slides for the talk.
Built by Gruntwork
Your entire infrastructure. Defined as code. In about a day.
Explore Gruntwork.io