Skip to content
SPECIFICTION
Get listed

AWS CloudFormation vs Terratest

AWS CloudFormation

aws.amazon.com

Terratest

terratest.gruntwork.io

Side by side

FigureAWS CloudFormationTerratest
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
WindowsYes—
macOSYes—
LinuxYesYes
iOSYes—
APIYes—
Plans published31
Spec score · Infrastructure Testing Tools9.1 (#3)7.8 (#13)
Founded20062016
PurposeCloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code.Terratest is a Go library with patterns and helper functions for testing infrastructure code.
What it doesAWS CloudFormation models, provisions, and manages AWS resources from declarative templates.Terratest is a Go library for writing automated tests for infrastructure code.

Plans

AWS CloudFormation

  • AWS CloudFormationFree
  • CloudFormation serviceFree
  • Third-party resource providersFree

AWS CloudFormation pricing →

Terratest

  • Apache 2.0 open-source licenseFree

Terratest pricing →

In their own words

AWS CloudFormation

AWS CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code. YAML or JSON templates define AWS resources and their properties. StackSets deploy a common set of resources across multiple AWS accounts and Regions; Change Sets preview proposed stack updates, including possible deletion or replacement, and Drift Detection tracks changes made outside the service. For authoring, AWS CDK supports TypeScript, Python, Java, and .NET, while AWS SAM offers shorthand YAML for serverless resources that is converted during deployment. The CloudFormation Registry supports third-party resources and modules, and stacks can be updated from remote Git repositories. The service is available through API, Linux, macOS, web, and Windows, and manages state. CloudFormation itself has a free plan, with no additional charge for AWS and Alexa resource providers, but created AWS resources are billed at their standard rates. Third-party provider and custom hook operations may also incur charges. Access can be managed with IAM, and CloudTrail logs API calls.

Visit aws.amazon.com

Terratest

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.

Visit terratest.gruntwork.io