At AWS re:Invent? Bring your audit questions to Anton Babenko.Meet Anton at AWS re:InventAsk for a time
Sign in
Menu
Start free
Annex B: PCI DSS

PCI DSS controls built into your Terraform modules. Enforced before apply.

Cardholder data protection starts at the infrastructure layer: encryption, access controls, logging and key management on AWS resources. The modules enforce these controls before apply and list the PCI DSS v4.0 requirement ID each one maps to, where the catalog names one.

Modules enforce 125 of 207 PCI DSS controls in the catalog. Of the 187 that cite a PCI DSS clause, they enforce 109. The controls they do not enforce stay with your team, with your SAQ or QSA assessment, penetration testing and network segmentation.

No credit card or AWS account needed to start. By Anton Babenko, maintainer of terraform-aws-modules, more than 2 billion provisions.

Annex B: PCI DSS

Framework
PCI DSS v4.0
For
Your team, on Terraform
B.1

Scope for PCI DSS

If your application stores, processes or transmits card numbers, PCI DSS applies. Even if you use Stripe, your AWS infrastructure may be in scope.

B.1.1

Covers

  • Infrastructure controls on AWS resources that map to PCI DSS v4.0 requirement IDs, by requirement in B.3.
  • terraform-aws-modules through the PCI DSS framework host or your org endpoint. Once your team switches to the compliance.tf provider, resources written by hand outside modules are checked against its built-in CIS controls, not the PCI DSS set.
B.1.2

Stays with your team

  • Your PCI DSS scope. Where cardholder data flows decides it; compliance.tf does not change it.
  • SAQ completion and submission.
  • QSA engagement and on-site assessments.
  • Penetration testing and vulnerability scanning.
  • Security awareness training.
  • Physical security of cardholder data environments.
  • Application-level security controls.
  • Network segmentation and firewall rules.
  • Resources outside compliance.tf module coverage, and every control B.4 lists as Mapped: 78 with a PCI DSS clause and 4 without one.
B.2

The source line

Point a module at the PCI DSS framework host. Same inputs and outputs, no state migration. Terraform 1.0 or later.

-  source  = "terraform-aws-modules/s3-bucket/aws"
+  source  = "pcidss.compliance.tf/terraform-aws-modules/s3-bucket/aws"
   version = "~> 5.0"

With an org endpoint, the source names your org host instead, and PCI DSS comes from your org's configuration.

B.3

Enforced and mapped, by requirement

Of the 187 PCI DSS controls in the documented catalog that cite a clause, modules enforce 109. A control appears once under each requirement it maps to.

Req. 1032 of 56
Req. 125 of 40
Req. 214 of 28
Req. 87 of 23
Req. 312 of 22
Req. 79 of 18
Req. 411 of 14
Req. 613 of 14
A16 of 11
Req. 55 of 9
A32 of 5
Req. 113 of 4
Req. 121 of 3

The catalog maps 20 more controls to PCI DSS without naming a clause, 16 of them enforced. They are listed apart at the end of B.4 and left out of these counts.

Every row is a control your QSA can look up.

Filter the register, or search by control name or clause, for example 3.5.1.

187 of 187 shown

Each control links to its public docs page.

Enforced
Modules set this control before anything is deployed.
Mapped
Documented on its docs page, not set by modules. Your team owns it.
B.4

Control register

ControlStatusPCI DSS clauses
ACM RSA certificates should use a key length of at least 2,048 bitsEnforced4.2.1
API Gateway routes should require an authorization typeEnforced1.5.1
AppSync API caches should have encryption at rest enabledEnforced3.5.1
AppSync API caches should have encryption in transit enabledEnforced4.2.1
AppSync GraphQL APIs should have field-level logging enabledEnforced10.2.1, 10.2.1.5, 10.4.2
CloudFront distributions should have a default root object configuredEnforced6.2.4
CloudFront distributions should require encryption in transitEnforced4.2.1
CloudFront distributions access logs should be enabledEnforced10.4.2
CloudFront distributions should use SNI to serve HTTPS requestsEnforced2.2.5
CloudFront distributions should use custom SSL/TLS certificatesEnforced4.2.1
CloudFront distributions should use the recommended TLS security policyEnforced4.2.1
CloudFront distributions should have AWS WAF enabledEnforced6.4.2
CloudWatch alarms should have an action configuredEnforced11.5.2
CloudWatch alarms should have action enabledEnforced10.7.2
CloudWatch log groups should have retention period of at least 365 daysEnforced3.2.1, 3.3.1.1, 3.3.1.3, 3.3.2, 3.3.3, 5.3.4, 10.5.1
DMS endpoints should use SSLEnforced4.2.1
DMS replication instances should have automatic minor version upgrade enabledEnforced6.3.3
DMS replication instances should not be publicly accessibleEnforced1.4.4
DynamoDB tables should have AWS KMS encryption enabledEnforced2.2.1
DynamoDB tables should have encryption enabledEnforced2.2.1
DynamoDB tables should have point-in-time recovery enabledEnforced3.2.1, 3.3.1.1, 3.3.1.3, 3.3.2, 3.3.3, 10.3.3, 10.5.1
Attached EBS volumes should have encryption enabledEnforced2.2.1, 3.5.1
EC2 instances should have detailed monitoring enabledEnforced10.4.2
EC2 instances should have IAM profile attachedEnforced7.2.1, 7.2.2, 7.2.5, 7.3.1, 7.3.2, 7.3.3, 8.2.7, 8.2.8, 8.3.4
EC2 instances should not use key pairs in running stateEnforced8.3.11
EC2 instances should not have a public IP addressEnforced1.4.2, 1.4.4
EC2 launch templates should not assign public IPs to network interfacesEnforced1.4.4
ECR repositories should have image scan on push enabledEnforced11.3.1
ECS clusters should have container insights enabledEnforced10.4.2
ECS fargate services should run on the latest fargate platform versionEnforced6.3.3
EFS file systems should have encryption at rest enabledEnforced2.2.1, 3.5.1
EFS file systems should be encrypted with CMKEnforced3.5.1
EKS clusters should have control plane audit logging enabledEnforced10.2.1
EKS clusters endpoint public access should be restrictedEnforced1.4.4
EKS clusters endpoint should restrict public accessEnforced1.4.4
ElastiCache Redis clusters should have automatic backups enabled with a retention period of 15 days or greaterEnforced10.3.3
ElastiCache for Redis replication groups should be encrypted at restEnforced2.2.1
ElastiCache for Redis replication groups should be encrypted in transitEnforced4.2.1
ELB application and classic load balancer logging should be enabledEnforced6.2.4, 10.4.2
ELB application load balancers should be configured to drop HTTP headersEnforced1.2.6, 6.4.2
ELB application load balancers should drop invalid HTTP headersEnforced1.2.6, 6.4.2
ELB application and network load balancer listeners should use ACM certificatesEnforced4.2.1
ELB application and network load balancer listeners should use secure protocolsEnforced4.2.1
ELB classic load balancers should be configured with defensive or strictest desync mitigation modeEnforced5.3.4, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.6.3, A1.2.3
API Gateway V2 stages should have access logging configuredEnforced10.4.2
KMS CMK rotation should be enabledEnforced3.7.4
Lambda functions should be in a VPCEnforced1.2.8, 1.3.1, 1.3.2, 1.4.2, 1.5.1, A1.1.2
Lambda functions should use latest runtimesEnforced6.3.3
Log groups should have encryption at rest enabledEnforced10.3.2
MSK clusters should require TLS for client-broker connectionsEnforced4.2.1
MSK clusters should have public access disabledEnforced1.3.1, 1.4.1, 1.4.2, 1.4.4
MSK clusters should disable unauthenticated accessEnforced7.2.1
Network Firewall firewalls should have deletion protection enabledEnforced1.2.8
Network Firewall policies should have default stateless action set to drop or forward for fragmented packetsEnforced1.2.8, 1.3.1, 1.3.2, 1.4.2, 1.4.3, 1.5.1, A1.1.2
Network Firewall policies should have default stateless action set to drop or forward for full packetsEnforced1.4.3
Network Firewall firewalls should have subnet change protection enabledEnforced1.4.1
OpenSearch domains should have audit logging enabledEnforced10.2.1
OpenSearch domains should have encryption at rest enabledEnforced2.2.1
OpenSearch domains should have fine-grained access control enabledEnforced7.2.2, 7.2.5
OpenSearch domains should use HTTPSEnforced8.3.2
OpenSearch domains should have logging to CloudWatch Logs enabledEnforced5.3.4, 10.5.1
OpenSearch domains node-to-node encryption should be enabledEnforced2.2.1
Aurora MySQL DB clusters should have audit logging enabledEnforced10.2.1, 10.2.1.2
Aurora PostgreSQL DB clusters should publish logs to CloudWatch LogsEnforced10.2.1, 10.2.1.2
RDS DB clusters should have automatic minor version upgrade enabledEnforced6.3.3
RDS DB clusters should be encrypted at restEnforced2.2.1
RDS DB clusters should have IAM authentication configuredEnforced7.3.1
RDS DB instance automatic minor version upgrade should be enabledEnforced6.3.3
RDS DB instances should be integrated with CloudWatch logsEnforced10.2.1
RDS DB instance encryption at rest should be enabledEnforced3.5.1
RDS DB instances should have iam authentication enabledEnforced7.3.1
RDS DB instances should have logging enabledEnforced10.2.1
RDS for PostgreSQL DB instances should publish logs to CloudWatch LogsEnforced10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.7
RDS DB instances should prohibit public accessEnforced1.4.4
RDS for SQL Server DB instances should publish logs to CloudWatch LogsEnforced10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.7
Redshift clusters should have audit logging enabledEnforced10.2.1
Redshift clusters should have automatic snapshots enabledEnforced10.3.3
Redshift clusters should have automatic upgrades to major versions enabledEnforced6.3.3
Redshift cluster encryption in transit should be enabledEnforced4.2.1
Redshift clusters should have audit logging and encryption enabledEnforced2.2.1, 10.2.1
Redshift clusters should have enhanced VPC routing enabledEnforced1.3.1, 1.3.2, 1.4.1, 1.4.2, 1.4.4
Redshift clusters should have KMS encryption enabledEnforced2.2.1
Redshift clusters should have required maintenance settingsEnforced6.3.3
Redshift clusters should have Multi-AZ deployments enabledEnforced3.5.1, 5.3.4, 6.3.3, 8.3.2, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.6.3, A1.2.3
Redshift clusters should not use the default admin usernameEnforced7.2.2, 7.2.5
Redshift clusters should prohibit public accessEnforced1.4.4
S3 buckets should not use ACLs for user access controlEnforced7.2.1, 7.2.2, 7.2.5, 7.3.1, 7.3.2, 7.3.3, 8.2.7, 8.2.8, 8.3.4
S3 buckets should have default encryption enabledEnforced2.2.1
S3 buckets should have default encryption enabled using KMSEnforced2.2.1
S3 buckets should have event notifications enabledEnforced11.5.2, 11.6.1, 12.10.5, A3.3.1, A3.5.1
S3 buckets should have lifecycle policies configuredEnforced3.2.1
S3 buckets should have logging enabledEnforced10.2.1
S3 buckets should not be accessible to all authenticated usersEnforced1.2.8, 1.3.1, 1.3.2, 1.4.2, 1.5.1, 3.5.1.3, 10.3.2, 10.3.3, 10.3.4, A1.1.2, A1.2.3, A3.4.1
S3 buckets should have object lock enabledEnforced10.5.1
S3 buckets should have policies that prohibit public accessEnforced8.3.4
S3 buckets should prohibit public read accessEnforced1.4.2, 1.4.4, 7.2.2, 7.2.5
S3 buckets should prohibit public write accessEnforced1.4.2, 1.4.4, 7.2.2, 7.2.5
S3 buckets with versioning enabled should have lifecycle policies configuredEnforced3.2.1
S3 buckets should have versioning enabledEnforced10.3.4
S3 public access should be blocked at account levelEnforced1.4.2
S3 public access should be blocked at bucket levelEnforced1.4.2
Secrets Manager secrets should be encrypted using CMKEnforced8.3.2
Step Functions state machines should have logging enabledEnforced5.3.4, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.6.3, A1.2.3
SNS topics should be encrypted at restEnforced2.2.1
VPC Security groups should only allow unrestricted incoming traffic for authorized portsEnforced1.3.1, 1.3.2
VPC security groups should restrict ingress from 0.0.0.0/0 or ::/0 to cassandra ports 7199 or 9160 or 8888Enforced1.3.1, 1.3.2
VPC subnet auto assign public IP should be disabledEnforced1.4.4
EC2 VPN connections should have logging enabledEnforced10.2.1, 10.2.2
WAFv2 rules should have CloudWatch metrics enabledEnforced10.7.2
API Gateway REST API stages should have a client certificate configuredMapped4.2.1
API Gateway REST API stages should have AWS X-Ray tracing enabledMapped5.3.4, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.4.1, 10.4.1.1, 10.4.2, 10.6.3, 10.7.1, 10.7.2, A1.2.3, A3.3.1, A3.5.1
API Gateway stages should have cache encryption at rest enabledMapped2.2.1
API Gateway stages should have logging enabledMapped10.2.1, 10.2.1.5, 10.4.2
Athena workgroups should be encrypted at restMapped2.2.1, 3.5.1
Athena workgroups should enforce configurationMapped2.2.1
Athena workgroups should have logging enabledMapped10.2.1, 10.2.1.2
Backup plan rules should retain recovery points for at least 35 daysMapped10.5.1
CloudFormation stacks should have notifications enabledMapped12.10.5
CloudTrail trails should have at least one enabled trail present in a regionMapped10.6.3
CloudTrail trails should be integrated with CloudWatch logsMapped5.3.4, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.4.1.1, 10.6.3, 11.5.2, 11.6.1, 12.10.5, A1.2.3, A3.3.1, A3.5.1
CloudTrail trails should have logs encrypted using a customer managed KMS keyMapped10.3.1, 10.3.2
CloudTrail trails should have log file validation enabledMapped10.3.4
CodeBuild projects should have artifact encryption enabledMapped2.2.1
CodeBuild projects should not have privileged mode enabledMapped7.2.2, 7.2.5
CodeBuild projects should have logging enabledMapped10.4.2
CodeBuild projects should have S3 logs encryptedMapped2.2.1
CodeBuild report group exports should be encrypted at restMapped3.5.1
Cognito identity pools should not allow unauthenticated identitiesMapped7.2.1, 7.3.1, 8.2.1
DataSync tasks should have logging enabledMapped10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7
DynamoDB Accelerator (DAX) clusters should be encrypted at restMapped2.2.1
DynamoDB Accelerator clusters should be encrypted in transitMapped4.2.1
DMS endpoints for Redis OSS should have TLS enabledMapped4.2.1
DocumentDB clusters should have an adequate backup retention periodMapped3.2.1, 3.3.1.1, 3.3.1.3, 3.3.2, 3.3.3, 10.5.1
DocumentDB clusters should have encryption at rest enabledMapped2.2.1, 3.5.1
DocumentDB instance logging should be enabledMapped5.3.4, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.6.3, A1.2.3
EBS snapshots should be encryptedMapped3.5.1, 8.3.2
EC2 Client VPN endpoints should have client connection logging enabledMapped10.4.2
EC2 instances should be in a VPCMapped1.4.4
EC2 network interfaces should have source/destination checking enabledMapped1.3.1, 1.3.2, 1.4.2
EC2 transit gateways should have auto accept shared attachments disabledMapped1.4.2
EFS access points should enforce a user identityMapped7.2.2, 7.2.5
EKS clusters should be configured to have kubernetes secrets encrypted using KMSMapped3.6.1, 8.3.2
ElastiCache clusters should not use the default subnet groupMapped1.4.4
EMR cluster Kerberos should be enabledMapped8.3.2
Elasticsearch domains should have audit logging enabledMapped10.2.1
ES domain encryption at rest should be enabledMapped2.2.1
ES domains should be in a VPCMapped1.4.4, 7.2.2, 7.2.5
Elasticsearch domain should send logs to CloudWatchMapped10.5.1
Elasticsearch domain node-to-node encryption should be enabledMapped2.2.1
IAM password policies should have minimum length set to 14 or greaterMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should require at least one lowercase letterMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should require at least one numberMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should require at least one symbolMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should require at least one uppercase letterMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should prevent password reuseMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should have strong configurations with minimum length of 8 or greaterMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should have strong configurationsMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
IAM password policies should expire passwords within 90 days or lessMapped8.3.6, 8.3.7, 8.3.9, 8.3.10.1, 8.6.3
Kinesis firehose delivery streams should have server side encryption enabledMapped3.5.1
Kinesis streams should have an adequate data retention periodMapped3.2.1
Kinesis streams should have server side encryption enabledMapped2.2.1
MQ brokers should have audit log streaming to CloudWatch enabledMapped10.2.1
MQ brokers should have automatic minor version upgrade enabledMapped6.3.3
MQ brokers should restrict public accessMapped1.4.4
MSK connectors should have logging enabledMapped10.2.1
Neptune DB clusters should publish audit logs to CloudWatch LogsMapped5.3.4, 10.2.1, 10.2.1.1, 10.2.1.2, 10.2.1.3, 10.2.1.4, 10.2.1.5, 10.2.1.6, 10.2.1.7, 10.2.2, 10.3.1, 10.6.3, A1.2.3
Neptune DB clusters should have automated backups enabledMapped10.3.3
Neptune DB clusters should be encrypted at restMapped2.2.1, 3.5.1
Neptune DB clusters should have IAM database authentication enabledMapped7.2.1, 7.2.2, 7.2.5, 7.3.1, 7.3.2, 7.3.3, 8.2.7, 8.2.8, 8.3.4
OpenSearch domains should be in a VPCMapped1.4.4, 7.2.2, 7.2.5
RDS DB instance backup should be enabledMapped10.3.3
Redshift Serverless namespaces should export logs to CloudWatch LogsMapped10.2.1, 10.2.1.1, 10.3.3
Redshift Serverless workgroups should have enhanced VPC routing enabledMapped1.3.1
Redshift Serverless workgroups should prohibit public accessMapped1.3.1, 1.4.2
S3 access points should have block public access settings enabledMapped1.4.4, 7.2.2, 7.2.5
S3 buckets should have MFA delete enabledMapped3.5.1.3, 8.4.1, 8.4.2, 8.4.3, 10.3.2, A1.1.2, A3.4.1
S3 buckets should have object logging enabledMapped10.2.1, 10.2.1.1, 10.2.1.7, 10.2.2, 10.3.2, 10.3.4
S3 buckets should restrict cross-account permissionsMapped7.2.1, 7.2.2, 7.2.5, 7.2.6, 7.3.1, 7.3.2, 7.3.3, 8.2.7, 8.2.8, 8.3.4, 10.6.3
SageMaker endpoint configuration encryption should be enabledMapped2.2.1
SageMaker models should be in a VPCMapped1.4.2, 1.4.4
SageMaker models should have network isolation enabledMapped1.3.1, 1.4.1, 1.4.2, 1.4.4
SageMaker notebook instances should not have direct internet accessMapped1.4.4
SageMaker notebook instance encryption should be enabledMapped2.2.1
SageMaker notebook instances should be in a VPCMapped2.2.1
SageMaker notebook instances root access should be disabledMapped7.2.2, 7.2.5
VPC security groups should not allow ingress from 0.0.0.0/0 to remote server administration ports (IPv4)Mapped1.3.1, 1.3.2, 1.4.2
VPC security groups should not allow ingress from ::/0 to remote server administration portsMapped1.3.1, 1.4.2

Enforced or mapped without a named PCI DSS clause

The catalog lists these 20 controls under PCI DSS but names no PCI DSS clause for them, so the register and the counts in B.3 leave them out. Each still links to its docs page.

ControlStatus
DMS endpoints for MongoDB should have an authentication mechanism enabledEnforced
EC2 instances should use IMDSv2Enforced
EC2 launch templates should use Instance Metadata Service Version 2 (IMDSv2)Enforced
ECS task definitions should not share the host's process namespaceEnforced
EFS access points should enforce a root directoryEnforced
ElastiCache for Redis replication groups should be encrypted with CMKEnforced
FSx for OpenZFS file systems should be configured to copy tags to backups and volumesEnforced
FSx for Lustre file systems should be configured to copy tags to backupsEnforced
RDS DB clusters should be encrypted with CMKEnforced
RDS database clusters should use a custom administrator usernameEnforced
RDS DB instances backup retention period should be greater than or equal to 7Enforced
RDS for MariaDB DB instances should publish logs to CloudWatch LogsEnforced
RDS database instances should use a custom administrator usernameEnforced
RDS DB instances should not use public subnetEnforced
Redshift clusters should not use the default database nameEnforced
S3 buckets should have cross-region replication enabledEnforced
EC2 instances should not use paravirtual instance typesMapped
Kinesis streams should be encrypted with CMKMapped
Redshift Serverless namespaces should not use the default database nameMapped
S3 Multi-Region Access Points should have block public access settings enabledMapped

Clause IDs for the QSA. Your stack stays as it is.

Compliance.tf works alongside your scanners, plan policy, CSPM and GRC tool. It sets the controls in the modules and lists the clause each one is there for.

B.5

Evidence

B.5.1

What compliance.tf gives your QSA

  • The PCI DSS clause IDs behind each enforced setting, with stable control IDs and public docs pages.
  • The config snapshot bound to each environment, and the per-action audit log of promotions between environments.
B.5.2

What comes from your AWS account and GRC tool

Evidence of what actually runs comes from your own account, for example AWS Config and your CSPM. Your GRC tool keeps tracking policies and audit workflows.

B.6

Plans for PCI DSS

PCI DSS is in the 30-day trial and in Full Access, $1,000 a year on AWS Marketplace. Schedule of fees.

B.7

Questions about PCI DSS

B.7.1

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

Compliance.tf supports PCI DSS v4.0, mandatory for assessments since 31 March 2024. Controls are mapped to v4.0 requirement IDs. If you need v3.2.1 mappings for transition purposes, contact us.

B.7.2

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.

B.7.3

What if we want to switch back?

Each module keeps the inputs and outputs of its terraform-aws-modules counterpart and needs no state migration, so switching back is the same source line change in reverse.