Freedom251 › Infrastructure Policy as Code Tools
Terraform Test Framework

What Terraform Test Framework is
Terraform Test Framework (TF2) is a free, open-source framework for testing Terraform code and infrastructure provisioned with Terraform. It supports compliance checks and Policy as Code before deployment, as well as end-to-end tests of deployed infrastructure. Tests can be written in Python, and the framework integrates with Terraform Open-source, Terraform Cloud, and Terraform Enterprise. For CI/CD pipelines, its listed integrations include Jenkins CI, GitLab CI, GitHub Actions, and Azure Pipelines. Installation is documented through pip, and an official Docker image combines TF2 with the latest Terraform version for pipeline use. The maker says the core relies on standard official Python libraries without external or third-party requirements, a design intended to reduce the attack surface. TF2 supports admission control and policy reporting, but not runtime enforcement. It is licensed under Apache 2.0 and described as under development, with further features planned. The changelog lists version 0.2.0, released September 30, 2022.
Who it suits
TF2 suits engineers who want to add Terraform tests to CI/CD pipelines, including compliance and end-to-end checks. It is intended for teams working with Terraform and Python.
What it does well
- Free and open source under Apache 2.0.
- Tests Terraform code and deployed infrastructure.
- Supports Python-based compliance and policy tests.
- Integrates with four listed CI/CD systems.
- Official Docker image is available for CI/CD.
What to know first
- Does not provide runtime enforcement.
- The maker describes the project as under development.
- Changelog lists version 0.2.0 from September 30, 2022.
Limits
TF2 does not provide runtime enforcement. The project is under development, and the changelog lists version 0.2.0 released on September 30, 2022.
Getting started
- Open the TF2 project website
- Install the package with pip install tf2project
- Write tests in Python for Terraform code or infrastructure
- Connect Terraform Open-source, Terraform Cloud, or Terraform Enterprise
- Add TF2 to Jenkins CI, GitLab CI, GitHub Actions, or Azure Pipelines
- Use the official Docker image for CI/CD
Verdict
TF2 brings pre-deployment policy checks and deployed-infrastructure tests into a framework with Terraform and CI/CD integrations. Its stated scope stops short of runtime enforcement, and the project remains under development.
Questions
Is Terraform Test Framework free?
Yes. It is free and open source, licensed under Apache 2.0.
Which platforms does TF2 support?
It is listed for Linux and self-hosted use.
What can TF2 test?
It tests Terraform code, compliance and Policy as Code before deployment, and deployed infrastructure end to end.
Which CI/CD systems integrate with TF2?
The listed integrations are Jenkins CI, GitLab CI, GitHub Actions, and Azure Pipelines.
Does TF2 enforce policies at runtime?
No. Runtime enforcement is not supported.
Who maintains the framework?
Saeid Bostandoust is identified as its creator and maintainer.
Facts from Terraform Test Framework's own pages
- CI/CD integrations
- The home page lists Jenkins CI, GitLab CI, and GitHub Actions; the end-to-end guide also lists Azure Pipelines. · tf2project.io, 8 Oct 2026
- CI integrations
- The getting-started guide lists Jenkins CI, GitLab CI, GitHub Actions, and Azure Pipelines as compatible. · tf2project.io, 8 Oct 2026
- Development status
- The maker describes TF2 as under development and says additional features are planned. · tf2project.io, 8 Oct 2026
- Docker
- An official Docker image includes the latest Terraform version and the TF2 framework for use in CI/CD pipelines. · tf2project.io, 8 Oct 2026
- End-to-end tests
- It supports end-to-end tests against real infrastructure after Terraform deployments. · tf2project.io, 8 Oct 2026
- Installation
- The maker documents installation with pip install tf2project and provides an official Docker image for CI/CD use. · tf2project.io, 8 Oct 2026
- Intended users
- The maker presents TF2 as a DevOps-friendly framework for engineers integrating Terraform tests into CI/CD pipelines. · tf2project.io, 8 Oct 2026
- License
- The project is licensed under Apache 2.0. · tf2project.io, 8 Oct 2026
- Maker
- The about page identifies Saeid Bostandoust as the framework's creator and maintainer. · tf2project.io, 8 Oct 2026
- Notable limit
- The maker's changelog lists version 0.2.0 as released on September 30, 2022. · tf2project.io, 8 Oct 2026
- Policy and compliance
- It supports compliance tests and Policy as Code before deployment. · tf2project.io, 8 Oct 2026
- Policy as code
- It supports compliance tests and Policy as Code before deployment. · tf2project.io, 8 Oct 2026
- Purpose
- TF2 is a unified framework for testing Terraform code and Terraform-provisioned infrastructure. · tf2project.io, 8 Oct 2026
- Python requirements
- The core uses standard and official Python libraries and says it has no external or third-party requirements. · tf2project.io, 8 Oct 2026
- Release information
- The changelog says version 0.2.0 was released on 30 September 2022. · tf2project.io, 8 Oct 2026
- Security design
- The maker says the core uses standard official Python libraries and has no external or third-party requirements, a policy intended to reduce the attack surface. · tf2project.io, 8 Oct 2026
- Support
- The about page says users can contact the creator with questions on LinkedIn. · tf2project.io, 8 Oct 2026
- Terraform integrations
- The framework integrates with Terraform Open-source, Terraform Cloud, and Terraform Enterprise. · tf2project.io, 8 Oct 2026
- Test language
- The maker says tests can be written in Python. · tf2project.io, 8 Oct 2026
Where Terraform Test Framework stands on Freedom251
- Infrastructure Policy as Code Tools#24 of 25