You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ module "postgres" {
22
22
name_prefix = "myapp-prod"
23
23
database_name = "myapp"
24
24
username = "dbadmin"
25
+
password = var.db_password # or from a secret manager
25
26
26
27
# Optional variables
27
28
instance_class = "db.t3.micro"
@@ -37,7 +38,7 @@ module "postgres" {
37
38
}
38
39
```
39
40
40
-
The module auto-generates a strong random password and exposes it as a sensitive Terraform output named `db_master_password`.
41
+
Provide the master password via input variable `password` (8–128 chars). The module echoes it back as a sensitive Terraform output named `db_master_password` for convenience.
- Database encryption is enabled by default using AWS KMS.
121
121
- Final snapshots are created by default when destroying the database (skip_final_snapshot = false).
122
122
- The module uses Kubernetes backend configuration. Ensure your Terraform environment is properly configured for this.
123
-
-The password is generated at apply time and marked as a sensitive output. Store it securely (e.g., AWS Secrets Manager) rather than relying on CLI history.
123
+
-Provide the password securely (e.g., from a secrets manager or environment variable) rather than hardcoding it; it is exposed as a sensitive output for convenience.
124
124
- Ensure `name_prefix` conforms to AWS naming constraints for RDS identifiers (letters, numbers, hyphens; must start with a letter; max 63 characters).
125
125
- Deletion protection is enabled by default. Set `deletion_protection = false` before destroying the instance.
0 commit comments