Sign in
Menu
Sign up
Docs

vs custom wrappers

Read this if your platform team maintains its own wrapper modules around terraform-aws-modules today. You keep the wrapper for what is specific to your organization: naming, tags, network layout. Compliance.tf takes over the compliance layer underneath it, so the wrapper stops carrying framework controls and their mappings. This page is for the platform lead who owns the Terraform standards.

Summary

DimensionCompliance.tfCustom wrapper modules
Compliance controls maintained byCompliance.tfYour team
Upstream compatibilitySame inputs and outputs as terraform-aws-modules, tracked per releaseYour team reviews and adapts every upstream release
Framework mappingControls mapped to clause IDs on the framework pagesYou build and maintain it, if at all
Hand-written resourcesThe compliance.tf provider for AWS checks aws_* resources before applyCovered only if they go through a wrapper
Organization-specific logicNot included; keep a thin wrapper on topAnything you write
Operational rulesDownload-time rules (prevent destroy, ignore tag changes, allowed regions) from an org Baseline, without editing module codeWritten into each wrapper
Catalog scopeModules in the compliance.tf catalogAny module or resource
Governance and evidenceVersioned snapshots per environment, approval before production, waivers with an expiry, an audit trail of posture changesYour Git history and release process
External dependencyThe compliance.tf registryNone
CostPaid subscription with a free trialEngineering time
Time to the first enforced moduleOne source change, plus fixing the validation errors it surfacesBuilding and testing the wrapper

What each tool solves

Compliance.tf serves terraform-aws-modules with the controls of the framework you pick, from an endpoint such as soc2.compliance.tf. The modules keep the upstream interface, track upstream releases, and map each control to the framework clauses it addresses. The provider covers the aws_* resources you declare directly.

Custom wrapper modules are modules your platform team writes and maintains. They usually wrap terraform-aws-modules or raw AWS resources with your defaults, input validation and policy decisions.

Where compliance.tf is stronger

  • Upstream releases are handled for you. With a wrapper, every upstream release means a review, an update, tests and an internal release.
  • Framework mappings come with the controls. Keeping a mapping from your defaults to SOC 2, PCI DSS, HIPAA or NIST 800-53 clauses current takes compliance knowledge and ongoing work. Compliance.tf publishes the mapping per control.
  • Less dependence on the people who wrote it. When the engineer who built the wrappers moves on, the compliance logic becomes someone else's problem. Compliance.tf moves that maintenance to a vendor, which is a dependency of its own (see Compare approaches).
  • Rules and posture without code changes. Org-wide operational rules apply at download time, and a project environment's control set changes by promoting a reviewed snapshot rather than releasing a new wrapper version.

Where custom wrappers are stronger

  • Your conventions. Naming patterns, tagging schemas, network topology and deployment conventions are yours to encode. You choose which variables to expose and what each default is.
  • No external dependency. Wrappers keep working whatever happens to a third-party service, and there is no subscription.
  • Any scope. You can wrap any module, any provider's resources or any combination.
  • Your release cycle. A requirement change ships when you push it. A change to a compliance.tf control follows the vendor's releases; per module you can still turn individual controls on and off.
  • Cost already budgeted. The engineering time is part of the platform team you already pay for.

Use both together

Use compliance.tf modules as the base layer and keep a thin wrapper for your organization's logic. The compliance.tf module is the wrapper's source; the wrapper adds naming and tags:

# modules/s3-bucket/main.tf - your thin wrapper
module "s3_bucket" {
  source  = "soc2.compliance.tf/terraform-aws-modules/s3-bucket/aws"
  version = "5.0.0"

  # Your naming convention, plus the inputs you choose to expose.
  bucket        = "${var.org_prefix}-${var.environment}-${var.name}"
  force_destroy = var.force_destroy

  # Your required tags, merged with whatever the caller adds.
  tags = merge({
    Environment = var.environment
    CostCenter  = var.cost_center
  }, var.tags)
}

When a framework requirement changes, compliance.tf updates the controls. When your conventions change, you update the wrapper.

Where a thin wrapper sits Layer stack: your thin wrapper adds naming, tags, network config and environment defaults; it calls the compliance.tf module, which adds encryption, logging, access controls and framework compliance on top of the upstream terraform-aws-modules resource configuration. source = source = YoursYour thin wrapperNaming · tags · network config · environment-specific defaults ComplianceCompliance.tf moduleEncryption · logging · access controls · framework compliance Upstreamterraform-aws-modulesCore AWS resource configuration

To move one wrapper over, the migration kit has per-module playbooks.

On this page

Ask AI about this

Help improve this page