Infra & Cloud
terraform
Intermediate
AWS RDS Postgres Terraform
Terraform resource for an RDS PostgreSQL instance with encryption and backup.
terraform
resource "aws_db_instance" "postgres" {
identifier = var.name
engine = "postgres"
engine_version = "16"
instance_class = "db.t3.micro"
allocated_storage = 20
username = var.db_user
password = var.db_pass
storage_encrypted = true
backup_retention_period = 7
skip_final_snapshot = false
}
Prerequisites
- terraform >= 1.0
- AWS provider
Pro Tips
- → Enable Multi-AZ for production.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- terraform
- Level
- Intermediate
- Read time
- 4 min
- Published
- Sep 2026
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
AWS S3 Static Website
Terraform module to provision an S3 bucket for static website hosting.
terraform
·
Intermediate
ECS Task Force Stop
Force-stop all running ECS tasks in a service for emergency rollback.
bash
·
Intermediate
AWS VPC with Public and Private Subnets
Terraform VPC module with NAT gateway, route tables and subnet tagging for EKS.
terraform
·
Advanced