# terraform-compliance/cli

a lightweight, security focused, BDD test framework against terraform.

Repository: https://github.com/terraform-compliance/cli
Canonical: https://ross.abutalabs.com/products/terraform-compliance-cli
Homepage: https://terraform-compliance.com
Language: Python
License: MIT
License Family: permissive
Topics: terraform, hashicorp, bdd-style, compliance, bdd, infrastructure, testing, testing-framework
Last push: 2026-05-08T10:47:53+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 81, release rhythm 71, longevity 100
- inputs: {"age_days": 3440, "days_push": 117, "days_rel": 117, "gap_med": 76.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1461, forks 160 (observed 2026-08-28T04:04:47.489158+00:00)

## What it is
terraform-compliance is a lightweight, security-focused BDD test framework for Terraform that enables negative testing of infrastructure-as-code. It validates Terraform plans against security and compliance policies before deployment and integrates easily into CI pipelines.

## Use cases
- test terraform code for security compliance before deploy
- write BDD tests for infrastructure as code
- enforce policies like requiring S3 bucket encryption
- add terraform compliance checks to CI pipeline
- run negative tests against terraform plan output
- validate terraform code against custom security standards
- separate compliance test ownership from infrastructure code

## When to choose
- you use Terraform and need free, open-source policy/compliance testing
- you want BDD-style (Given/When/Then) tests for infrastructure code
- you need pre-deploy validation in pipelines or git hooks
- you want provider-agnostic checks that work with any Terraform provider

## When to avoid
- you need policy enforcement for non-Terraform IaC tools like CloudFormation or Pulumi
- you already use HashiCorp Sentinel or OPA with full policy tooling
- you need functional testing of deployed infrastructure rather than plan-level checks

## Facets
- artifact type: cli-tool
- maturity: active
- function: testing, security, developer-tools, cli
- domain: infrastructure-as-code, security, testing, cloud-computing
- platform: cli, python, cross-platform
- tags: terraform, bdd, compliance, infrastructure-as-code, negative-testing, policy-as-code, ci-cd, devops, docker

## Member repositories
- terraform-compliance/cli (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:47.489158+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:35:22.296460+00:00, confidence not recorded.
  - readme: https://github.com/terraform-compliance/cli (fetched 2026-08-28T04:04:47.489158+00:00, sha 7a5d0776a171)
  - homepage: https://terraform-compliance.com (fetched 2026-08-29T11:44:04.801411+00:00, sha e67ea4026faa)
  - site_page: https://terraform-compliance.com/pages/installation (fetched 2026-08-29T11:44:04.810726+00:00, sha 4901ad85dc3e)
  - site_page: https://terraform-compliance.com/pages/installation/pip.html (fetched 2026-08-29T11:44:04.812720+00:00, sha cb9783451537)
  - site_page: https://terraform-compliance.com/pages/installation/docker.html (fetched 2026-08-29T11:44:04.814463+00:00, sha e4b31ef4a731)
- Data as of 2026-08-30T08:39:29.467469+00:00.
