Terraform AWS RDS
RDS instances with subnet groups, security groups, storage encryption, automated backups, maintenance windows, performance insights, IAM authentication, and log exports.
Controls enforced
These compliance controls are checked at terraform plan time.
- RDS DB instances and clusters should have enhanced monitoring enabled(low effort)
- RDS databases and clusters should not use a database engine default port(low effort)
- RDS DB instance automatic minor version upgrade should be enabled(low effort)
- RDS DB instance backup should be enabled(low effort)
- RDS DB instances backup retention period should be greater than or equal to 7(low effort)
- RDS DB instances should be integrated with CloudWatch logs(low effort)
- RDS DB instances should be configured to copy tags to snapshots(low effort)
- RDS DB instances should have deletion protection enabled(low effort)
- RDS DB instance encryption at rest should be enabled(low effort)
- RDS DB instances should have iam authentication enabled(low effort)
- RDS instances should be deployed in a VPC(low effort)
- RDS DB instances should have logging enabled(low effort)
- RDS for MariaDB DB instances should publish logs to CloudWatch Logs(low effort)
- RDS DB instances should have multiple AZ enabled(low effort)
- RDS database instances should use a custom administrator username(low effort)
- RDS DB instances should not use public subnet(low effort)
- RDS for PostgreSQL DB instances should publish logs to CloudWatch Logs(low effort)
- RDS DB instances should prohibit public access(low effort)
- RDS for SQL Server DB instances should publish logs to CloudWatch Logs(low effort)
Quick start
View this module on the compliance.tf registry — versions, inputs, and outputs →
See the Get Started guide and Registry Endpoints for details on how to customize the module for your requirements.
Migration from upstream
Already using terraform-aws-modules? Change only the source URL:
module "rds" {
source = "terraform-aws-modules/rds/aws"
version = ">= 7.0.0"
}module "rds" {
source = "soc2.compliance.tf/terraform-aws-modules/rds/aws"
version = ">= 7.0.0"
}Same arguments. Same outputs. Controls are checked at terraform plan. See the Migration Guide for step-by-step instructions.
Reversibility
No lock-in. Switch back by reverting the source URL:
module "rds" {
source = "terraform-aws-modules/rds/aws"
}Run terraform init -upgrade. Terraform state is unchanged — same resource addresses, same provider, no compliance.tf-specific resources. Controls you already applied remain in AWS.
Mapped compliance frameworks
Framework coverage
Which controls from this module are active under each framework endpoint.
● enforced by default · ○ not activated by this endpoint
Known Terraform limitations
Separately from the controls above, some things people ask this module for cannot be implemented by any module in any registry - they are limits of Terraform itself. Known limitations for this module lists the recurring ones: what causes each, the native workaround in full, and - where one exists - the opt-in Operational Rule that removes the need for a fork.