AWS RDS Terraform Module
A battle-tested Terraform module for creating and managing AWS RDS database instances, subnet groups, parameter groups, option groups, and monitoring resources.
Quick Start
Deploy your first RDS instance in minutes with a complete working example.
Engine Guides
Configure MySQL, PostgreSQL, Oracle, MSSQL, and MariaDB instances.
Security
Encryption, IAM authentication, Secrets Manager password rotation, and VPC isolation.
Monitoring
Enhanced Monitoring, Performance Insights, and CloudWatch log exports.
Read Replicas
Create read replicas and cross-region replica configurations.
Blue/Green Deployments
Zero-downtime upgrades and schema changes using RDS Blue/Green deployments.
Key features
Multi-engine support
Supports MySQL, PostgreSQL, Oracle, Microsoft SQL Server, and MariaDB with engine-specific configuration options.
Composable submodules
Use the root module or individual submodules —
db_instance, db_subnet_group, db_parameter_group, db_option_group — independently.Secrets Manager integration
Automatic master password management and rotation using AWS Secrets Manager with configurable rotation schedules.
Storage encryption
Storage encrypted by default with customer-managed KMS key support, provisioned IOPS, gp3 throughput control, and storage autoscaling.
High availability
Multi-AZ deployments, automated backups, point-in-time recovery, and S3 import for MySQL.
Observability
Enhanced Monitoring with automatic IAM role creation, Performance Insights, and CloudWatch log group management.
Module architecture
The root module composes five submodules that can also be used independently:| Submodule | Description |
|---|---|
db_instance | Core RDS DB instance with all configuration options |
db_subnet_group | VPC subnet group for DB instance placement |
db_parameter_group | Engine-specific parameter configuration |
db_option_group | Optional engine features (MySQL/Oracle/MSSQL) |
db_instance_role_association | Associate IAM roles with a DB instance |
Requirements
| Requirement | Version |
|---|---|
| Terraform | >= 1.11.1 |
| AWS Provider | >= 6.28 |