Skip to content
SPECIFICTION
Get listed

Terratest

terratest.gruntwork.io

Free plan Linux

What it is

Terratest is an open-source Go library for writing automated tests for infrastructure code. Its helpers cover Terraform, OpenTofu, Terragrunt, Packer, Helm, Docker, and Kubernetes, as well as AWS, Azure, and GCP APIs. Tests can run infrastructure tools, deploy real resources, validate the resulting environment, and remove resources afterward. Validation can use HTTP requests, API calls, SSH connections, and shell commands. The documentation covers unit, integration, and end-to-end tests, along with parallelism, retries, error handling, and static analysis. Terratest runs locally and supports configuration-compliance checks, provisioning tests, deployed checks, and policy as code. The project is free under the Apache 2.0 License. The quick start requires Go 1.26 or later and OpenTofu or Terraform for its examples. The documentation recommends cleaning up after tests because they may create resources in real environments. General questions and issue reports go through GitHub Discussions and Issues; Gruntwork offers commercial support to companies using Terratest in production. The v1 line receives security fixes only while v2 is in development.

Spec sheet

What it does
Terratest is a Go library for writing automated tests for infrastructure code.Read 3 Oct 2026 · terratest.gruntwork.io
Purpose
Terratest is a Go library with patterns and helper functions for testing infrastructure code.Read 2 Oct 2026 · terratest.gruntwork.io
Intended users
Terratest is for teams testing infrastructure code, including code built with Terraform, Packer, Docker, and Kubernetes.Read 3 Oct 2026 · terratest.gruntwork.io
Support
Users can ask general questions in GitHub Discussions, report bugs or request improvements through GitHub Issues, and obtain commercial support from Gruntwork.Read 3 Oct 2026 · terratest.gruntwork.io
License
The Terratest code is released under the Apache 2.0 License.Read 3 Oct 2026 · github.com
Founded
2016Read 23 Sep 2026 · terratest.gruntwork.io
Maker
The site identifies Terratest as built by Gruntwork.Read 2 Oct 2026 · terratest.gruntwork.io
Cloud integrations
Its helpers include working with AWS, Azure, and GCP APIs.Read 3 Oct 2026 · github.com
Cloud support
The site includes examples for AWS and GCP, and lists Azure support among its examples.Read 2 Oct 2026 · terratest.gruntwork.io
Commercial support
Companies relying on Terratest in production can get commercial support directly from Gruntwork.Read 2 Oct 2026 · terratest.gruntwork.io
Community support
Users can ask questions in GitHub Discussions and report bugs or request improvements through GitHub Issues.Read 2 Oct 2026 · terratest.gruntwork.io
Infrastructure tools
Terratest provides helpers for Terraform and OpenTofu, Packer, Docker, Kubernetes, and Helm.Read 3 Oct 2026 · github.com
Maker founding
Gruntwork says the two companies that became Gruntwork merged in 2016.Read 2 Oct 2026 · gruntwork.io
Open source
Terratest is an open source project, and its code is released under the Apache 2.0 License.Read 2 Oct 2026 · terratest.gruntwork.io
Other helpers
The library includes helpers for SSH commands, HTTP requests, and shell commands.Read 3 Oct 2026 · github.com
Requirements
Terratest requires Go 1.26 or later; its Terraform helpers can use either the Terraform or OpenTofu binary.Read 3 Oct 2026 · terratest.gruntwork.io
Resource cleanup
The documentation recommends cleaning up after tests because Terratest can deploy real resources into real environments.Read 2 Oct 2026 · terratest.gruntwork.io
Supported tools
The site lists first-class support for Terraform, Packer, Docker, Kubernetes, AWS, GCP, and more.Read 2 Oct 2026 · terratest.gruntwork.io
Test types
The documentation covers unit, integration, and end-to-end testing, as well as parallelism, retries, error handling, and static analysis.Read 2 Oct 2026 · terratest.gruntwork.io
Test workflow
Terratest tests use Go’s testing framework to run infrastructure tools, validate deployed infrastructure, and undeploy it at the end.Read 2 Oct 2026 · terratest.gruntwork.io
Testing workflow
Tests can deploy real infrastructure, validate it with HTTP requests, API calls, or SSH connections, and undeploy it at the end.Read 3 Oct 2026 · terratest.gruntwork.io
Validation
Built-in tools can validate infrastructure by making HTTP requests, API calls, and SSH connections.Read 2 Oct 2026 · terratest.gruntwork.io
Version maintenance
The v1 line receives security fixes only while v2 is in development.Read 3 Oct 2026 · github.com

Plans and prices

Apache 2.0 open-source license Free Go 1.26 or later · infrastructure testing library Read 3 Oct 2026 · github.com

Every Terratest plan and price →

Strong points and limits

Strong points

  • Free under the Apache 2.0 License
  • Helpers cover multiple infrastructure tools and cloud APIs
  • Supports unit, integration, and end-to-end testing
  • Validation includes HTTP, API, and SSH checks
  • Runs locally

Limits

  • Quick start requires Go 1.26 or later
  • Examples require OpenTofu or Terraform
  • Tests can deploy real resources
  • The v1 line receives security fixes only

Who it suits

It suits teams that write and verify infrastructure code with tools such as Terraform, Packer, Docker, or Kubernetes. Users should be prepared to manage cleanup when tests create real resources.

Verdict

Terratest provides a broad testing toolkit for infrastructure code, including checks against deployed environments. Its real-resource workflow and stated Go requirement are important setup considerations.

Where Specifiction places it

Alternatives to TerratestAll alternatives →