# RDS PostgreSQL Multi-AZ, encrypted, private, with deletion protection and a password managed by AWS. ```hcl variable "db_subnet_group" { type = string } variable "security_group_ids" { type = list(string) } resource "aws_db_instance" "main" { identifier = "workload" engine = "postgres" engine_version = "16" instance_class = "db.m7g.large" allocated_storage = 100 storage_type = "gp3" storage_encrypted = true multi_az = true publicly_accessible = false db_subnet_group_name = var.db_subnet_group vpc_security_group_ids = var.security_group_ids username = "app_admin" manage_master_user_password = true backup_retention_period = 14 deletion_protection = true skip_final_snapshot = false final_snapshot_identifier = "workload-final" } ```