Freedom251 › Infrastructure Testing Tools
Terratest

What Terratest is
Terratest is a free, open-source Go library built by Gruntwork for automated infrastructure testing. It provides patterns and helper functions for Terraform, OpenTofu, Terragrunt, Packer, Helm, Docker, and Kubernetes, with cloud helpers for AWS, Azure, and GCP. Tests can run infrastructure tools, deploy real resources, validate the resulting environment, and undeploy resources afterward. Validation helpers support HTTP requests, API calls, SSH connections, and shell commands. Documentation covers unit, integration, and end-to-end tests, plus parallel execution, retries, error handling, and static analysis. Terratest runs locally and includes configuration-compliance, provisioning, deployed-check, and policy-as-code capabilities. The project uses the Apache 2.0 License and costs nothing. Quick-start examples require Go 1.26 or later and OpenTofu or Terraform. Questions and issue reports go through GitHub, while Gruntwork offers commercial support. The v1 line receives security fixes while v2 is in development.
Who it suits
Terratest suits teams testing infrastructure code built with Terraform, OpenTofu, Packer, Docker, Kubernetes, and related tools. It is useful when tests need to validate deployed resources in cloud environments.
What it does well
- Open-source Apache 2.0 license
- Helpers for major infrastructure tools
- HTTP, API, SSH, and shell validation
- Unit, integration, and end-to-end coverage
- AWS, Azure, and GCP helpers
What to know first
- Requires Go 1.26 or later
- Examples require OpenTofu or Terraform
- Tests can create real resources
- v1 receives security fixes only
Limits
The free Apache 2.0 plan requires Go 1.26 or later. The quick-start examples require OpenTofu or Terraform, and the v1 line receives security fixes only while v2 is in development.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Apache 2.0 open-source license | Go 1.26 or later · infrastructure testing library | Free |
As terratest.gruntwork.io lists them, read 3 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the Terratest website.
- Install Go version 1.26 or later.
- Install OpenTofu or Terraform for the quick-start examples.
- Use the library's helpers to run infrastructure tools and validate deployed infrastructure.
- Clean up resources after tests.
- Use GitHub Discussions for questions or GitHub Issues for bugs and improvement requests.
Verdict
Terratest provides a broad Go-based toolkit for testing infrastructure locally and against deployed environments. Its real-resource workflow is powerful but requires cleanup and the stated Go and tool prerequisites.
Questions
How much does Terratest cost?
The Apache 2.0 open-source plan is free.
Is Terratest open source?
Yes. Its code is released under the Apache 2.0 License.
What does Terratest support?
Its helpers cover Terraform, OpenTofu, Terragrunt, Packer, Helm, Docker, and Kubernetes. It also includes helpers for AWS, Azure, and GCP APIs.
What do I need to get started?
The quick start requires Go version 1.26 or later and OpenTofu or Terraform for its examples.
How can users get support?
Users can ask questions in GitHub Discussions or report bugs and request improvements through GitHub Issues. Gruntwork offers commercial support to companies relying on Terratest in production.
Can tests create real infrastructure?
Yes. Tests can deploy real resources, validate them, and undeploy them; the documentation recommends cleaning up after tests.
Facts from Terratest's own pages
- Cloud integrations
- Its helpers include working with AWS, Azure, and GCP APIs. · github.com, 3 Oct 2026
- Cloud support
- The site includes examples for AWS and GCP, and lists Azure support among its examples. · terratest.gruntwork.io, 2 Oct 2026
- Commercial support
- Companies relying on Terratest in production can get commercial support directly from Gruntwork. · terratest.gruntwork.io, 2 Oct 2026
- Community support
- Users can ask questions in GitHub Discussions and report bugs or request improvements through GitHub Issues. · terratest.gruntwork.io, 2 Oct 2026
- Founded
- 2016 · terratest.gruntwork.io, 23 Sept 2026
- Infrastructure tools
- Terratest provides helpers for Terraform and OpenTofu, Packer, Docker, Kubernetes, and Helm. · github.com, 3 Oct 2026
- Intended users
- Terratest is for teams testing infrastructure code, including code built with Terraform, Packer, Docker, and Kubernetes. · terratest.gruntwork.io, 3 Oct 2026
- License
- The Terratest code is released under the Apache 2.0 License. · github.com, 3 Oct 2026
- Maker
- The site identifies Terratest as built by Gruntwork. · terratest.gruntwork.io, 2 Oct 2026
- Maker founding
- Gruntwork says the two companies that became Gruntwork merged in 2016. · gruntwork.io, 2 Oct 2026
- Open source
- Terratest is an open source project, and its code is released under the Apache 2.0 License. · terratest.gruntwork.io, 2 Oct 2026
- Other helpers
- The library includes helpers for SSH commands, HTTP requests, and shell commands. · github.com, 3 Oct 2026
- Purpose
- Terratest is a Go library with patterns and helper functions for testing infrastructure code. · terratest.gruntwork.io, 2 Oct 2026
- Requirements
- Terratest requires Go 1.26 or later; its Terraform helpers can use either the Terraform or OpenTofu binary. · terratest.gruntwork.io, 3 Oct 2026
- Resource cleanup
- The documentation recommends cleaning up after tests because Terratest can deploy real resources into real environments. · terratest.gruntwork.io, 2 Oct 2026
- Support
- Users can ask general questions in GitHub Discussions, report bugs or request improvements through GitHub Issues, and obtain commercial support from Gruntwork. · terratest.gruntwork.io, 3 Oct 2026
- Supported tools
- The site lists first-class support for Terraform, Packer, Docker, Kubernetes, AWS, GCP, and more. · terratest.gruntwork.io, 2 Oct 2026
- Testing workflow
- Tests can deploy real infrastructure, validate it with HTTP requests, API calls, or SSH connections, and undeploy it at the end. · terratest.gruntwork.io, 3 Oct 2026
- Test types
- The documentation covers unit, integration, and end-to-end testing, as well as parallelism, retries, error handling, and static analysis. · terratest.gruntwork.io, 2 Oct 2026
- Test workflow
- Terratest tests use Go’s testing framework to run infrastructure tools, validate deployed infrastructure, and undeploy it at the end. · terratest.gruntwork.io, 2 Oct 2026
- Validation
- Built-in tools can validate infrastructure by making HTTP requests, API calls, and SSH connections. · terratest.gruntwork.io, 2 Oct 2026
- Version maintenance
- The v1 line receives security fixes only while v2 is in development. · github.com, 3 Oct 2026
- What it does
- Terratest is a Go library for writing automated tests for infrastructure code. · terratest.gruntwork.io, 3 Oct 2026
Where Terratest stands on Freedom251
- Infrastructure Testing Tools#23 of 28
