PCI DSS Compliant Terraform Modules
Enforced Before terraform apply

Cardholder data protection starts at the infrastructure layer. Every module enforces encryption, access controls, logging, and key management before deployment.

If your application stores, processes, or transmits credit card numbers, PCI DSS is mandatory. Non-compliance can result in fines or loss of card processing privileges. Even if you use Stripe, your AWS infrastructure may be in scope.

278

Controls

40

Clauses

34

AWS Modules

No credit card or AWS account needed to start.

From the team behind terraform-aws-modules. 2B+ provisions worldwide.

IAM · S3 · RDS · CloudWatch Logs · General · VPCSOC 2 Type II CertifiedAvailable on AWS Marketplace

Three Steps to PCI DSS Compliant Infrastructure

For terraform-aws-modules users, migration is a one-line change. Same workflow, same interface. Bringing your own modules? We can make those compliant too. Join the beta.

1

Change One Line

main.tf
module "s3" {
- source = "registry.terraform.io/..."
+ source = "pcidss.compliance.tf/..."
 
  bucket = "awesome-docs"
}
2

Run Terraform Commands

terminal
$ terraform init
Initializing modules...
- module.s3 in pcidss.compliance.tf/...
Terraform has been successfully initialized!
$ terraform apply
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
3

Compliance Enforced

10.2.1 · Logging Enabled
10.5.1 · Object Lock Enabled
3.2.1 · Versioning + Lifecycle
3.4.1 · Default Encryption
3.4.1 · KMS Encryption
1.3.1 · Public Access Blocked
4.2.1 · SSL Requests Only
10.3.1 · MFA Delete

Every compliance requirement you define is enforced automatically. Nothing to scan, nothing to remediate.

Controls Enforced for PCI DSS

278 controls across 40 clauses and AWS services

Enforced (22)Detected (23)
·

Additional Controls

233 additional controls enforced for PCI DSS

Enforced (110)Detected (123)

PCI DSS Scope: What We Handle vs. What You Own

compliance.tf handles the infrastructure configuration layer for PCI DSS. Here is what it covers and what stays with your team.

compliance.tf Enforces for PCI DSS

  • Infrastructure-level data protection controls (encryption, access blocking, logging)
  • PCI DSS v4.0 requirement mapping with specific requirement IDs
  • Deployment-time evidence generation via AWS-native tools
  • Upstream module updates (terraform-aws-modules kept in sync)
  • Exception management with audit trail
  • Control documentation and requirement mapping matrices

Your Team Still Handles for PCI DSS

  • SAQ completion and submission
  • QSA engagement and on-site assessments
  • Penetration testing and vulnerability scanning
  • Security awareness training programs
  • Physical security of cardholder data environments
  • Application-level security controls
  • Network segmentation and firewall rules

compliance.tf handles the PCI DSS requirements that map to AWS resource configuration. Your QSA still assesses your full cardholder data environment.

PCI DSS Audit Evidence, Generated Automatically

Your auditor does not need to trust compliance.tf. Evidence comes from AWS-native tools they already accept.

Evidence your auditor already trusts

Every compliance.tf module enforces controls at deploy time. When AWS Config, Security Hub, or Audit Manager evaluates your resources, they report clean findings because the controls are built into the modules, not bolted on after the fact.

  • AWS Config rules validate resource configuration continuously
  • Security Hub aggregates findings across accounts and regions
  • Audit Manager generates assessment reports mapped to PCI DSS
  • Downloadable control mapping matrices for your auditor
evidence.json
{
  "framework": "PCI DSS",
  "clause": "3.4.1",
  "control": "s3_bucket_default_encryption_enabled",
  "status": "COMPLIANT",
  "source": "AWS Config",
  "resource": "arn:aws:s3:::awesome-docs",
  "evaluated": "2026-03-04T10:30:00Z"
}

Prevention vs. Detection for PCI DSS

compliance.tf prevents non-compliant deployments. Scanning tools detect them after the fact. Most mature programs use both.

DimensionIaC Scanning
Checkov / Trivy / Prowler
compliance.tf
Prevents non-compliant configs before terraform applyNo (post-plan scan)Yes
Maps controls to framework clause IDsPartialYes
Produces auditor-accepted evidence (AWS-native)Scan reports onlyYes
Exception management with audit trailSuppression rulesYes
Same interface as terraform-aws-modulesN/AYes
Keeps pace with upstream module updatesN/AYes
Catches runtime drift / console changesYesNo
Covers non-Terraform resourcesYesNo
Internal engineering timeMediumLow

We recommend keeping scanning tools active alongside compliance.tf for defense in depth. The scanner validates what compliance.tf already enforces.

PCI DSS Compliance Questions

Can compliance.tf reduce my PCI DSS scope?

compliance.tf does not change your PCI DSS scope — that is determined by where cardholder data flows. What it does is ensure that every AWS resource within scope is configured to meet PCI DSS requirements before deployment. This means fewer findings during your QSA assessment and less remediation work.

Is this PCI DSS v3.2.1 or v4.0?

compliance.tf supports PCI DSS v4.0, the current version effective since March 2024. Controls are mapped to v4.0 requirement IDs. If you need v3.2.1 mappings for transition purposes, contact us.

How is this different from Checkov, Trivy, or Prowler?

Those tools are detective controls. They scan infrastructure after you write it and report findings you fix manually. compliance.tf is a preventive control. The modules themselves cannot produce non-compliant resources. There is nothing to scan, nothing to remediate. Most teams keep their scanners running alongside compliance.tf for defense in depth.

Can I adopt this gradually, or is it all-or-nothing?

Fully incremental. Start with one module in one environment. Your existing modules continue working untouched. If you use Terragrunt or Terramate to orchestrate your runs, nothing changes — you’re only swapping the module source line. There is no global policy agent to deploy, no wrapper binary, no sidecar. Each module source line is independent.

Will my auditor accept this as evidence?

Your auditor does not need to trust compliance.tf directly. Evidence comes from AWS-native tools they already accept: AWS Config, Security Hub, and Audit Manager. We enforce controls at deploy time so those AWS tools always report clean findings.

What if I want to switch back or compliance.tf shuts down?

Our modules are standard Terraform. They work with Terraform, OpenTofu, Terragrunt, Terramate, and any tool that speaks the Terraform module protocol. Every module is a drop-in replacement for its upstream terraform-aws-modules equivalent with the same variables and outputs. Change your module source line back, run terraform init. Your infrastructure does not change. No lock-in, no proprietary state.

Start Deploying PCI DSS-Compliant Infrastructure

$100/year for all 34 modules, all frameworks. 30-day free trial.

No credit card required. Switch back at any time.

Stay Informed About New Features

Join the mailing list for releases, new modules, and roadmap updates. No spam. Unsubscribe anytime.

Not convinced yet or dying for a feature we don't have? Send us an email — we really want to hear your feedback!