Terraform Test Framework
tf2project.io
- Linux
- Self-hosted
What Terraform Test Framework is
Terraform Test Framework, or TF2, is a free open-source framework for testing Terraform code and Terraform-provisioned infrastructure. It supports compliance tests and Policy as Code before deployment, plus end-to-end tests of deployed infrastructure. Tests can be written in Python, and TF2 integrates with Terraform Open-source, Terraform Cloud, and Terraform Enterprise. CI/CD compatibility includes Jenkins CI, GitLab CI, GitHub Actions, and Azure Pipelines. Teams can install it with pip install tf2project, or use an official Docker image containing TF2 and the latest Terraform version for pipeline work. The maker says the core uses standard official Python libraries without external or third-party requirements. TF2 supports policy testing, admission control, policy reporting, and CI/CD integration, but not runtime enforcement. It is licensed under Apache 2.0 and described as under development. The changelog lists version 0.2.0, released September 30, 2022.
Who it suits
TF2 is aimed at DevOps-friendly engineers integrating Terraform tests into CI/CD pipelines. It fits teams using Python policies, Terraform infrastructure, and pre-deployment compliance checks.
Good to know, and what to watch
- Free Apache 2.0 open-source framework
- Supports compliance and Policy as Code tests
- Works with major Terraform editions
- Integrates with Jenkins, GitLab, GitHub, and Azure
- Official Docker image for CI/CD
- No runtime enforcement
- Described as under development
- Changelog lists version 0.2.0 from 2022
- Python is the policy language
The verdict
TF2 covers Terraform policy, compliance, and end-to-end testing across common pipeline tools. Teams needing controls while infrastructure runs will need to account for its lack of runtime enforcement.
What the maker publishes
- CI/CD integrations
- The home page lists Jenkins CI, GitLab CI, and GitHub Actions; the end-to-end guide also lists Azure Pipelines. source
- CI integrations
- The getting-started guide lists Jenkins CI, GitLab CI, GitHub Actions, and Azure Pipelines as compatible. source
- Development status
- The maker describes TF2 as under development and says additional features are planned. source
- Docker
- An official Docker image includes the latest Terraform version and the TF2 framework for use in CI/CD pipelines. source
- End-to-end tests
- It supports end-to-end tests of deployed infrastructure. source
- End-to-end tests
- It supports end-to-end tests against real infrastructure after Terraform deployments. source
- Installation
- The maker documents installation with pip install tf2project and provides an official Docker image for CI/CD use. source
- Intended users
- The maker presents TF2 as a DevOps-friendly framework for engineers integrating Terraform tests into CI/CD pipelines. source
- License
- The project is licensed under Apache 2.0. source
- Maker
- The about page identifies Saeid Bostandoust as the framework's creator and maintainer. source
- Notable limit
- The maker's changelog lists version 0.2.0 as released on September 30, 2022. source
- Policy and compliance
- It supports compliance tests and Policy as Code before deployment. source
- Policy as code
- It supports compliance tests and Policy as Code before deployment. source
- Purpose
- TF2 is a unified framework for testing Terraform code and Terraform-provisioned infrastructure. source
- Python requirements
- The core uses standard and official Python libraries and says it has no external or third-party requirements. source
- Release information
- The changelog says version 0.2.0 was released on 30 September 2022. source
- 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. source
- Support
- The about page says users can contact the creator with questions on LinkedIn. source
- Terraform integrations
- The framework integrates with Terraform Open-source, Terraform Cloud, and Terraform Enterprise. source
- Test language
- The maker says tests can be written in Python. source
Checked against the maker's pages on 8 Oct 2026.