Terratest is a Go library that makes it easier to write automated tests for your infrastructure code. It provides a variety of helper functions and patterns for common infrastructure testing tasks, including:
- Testing Terraform code
- Testing Packer templates
- Testing Docker images
- Executing commands on servers over SSH
- Working with AWS APIs
- Working with Azure APIs
- Working with GCP APIs
- Working with Kubernetes APIs
- Testing Helm Charts
- Making HTTP requests
- Running shell commands
- And much more
go get github.com/gruntwork-io/terratest@latestRequires Go 1.26 or later.
Starting with v1.0.0, Terratest follows semantic versioning. Breaking changes to the public API only happen in major releases (e.g. v2.0.0).
Symbols renamed or replaced in v1 are kept with // Deprecated: annotations pointing at the new name; removals happen
in v2. Migrating from v0.x: see MIGRATION.md.
- Terratest Website
- Getting started with Terratest
- Terratest Documentation
- Contributing to Terratest
- Commercial Support
This code is released under the Apache 2.0 License. Please see LICENSE and NOTICE for more details.
Copyright © 2025 Gruntwork, Inc.