Managed password (default)
Withmanage_master_user_password = true (the default), RDS automatically generates a strong password and stores it in AWS Secrets Manager. You never see the plaintext password in Terraform state.
Set to
true to let RDS manage the master user password in Secrets Manager. Cannot be set together with master_password_wo.KMS key ARN, key ID, alias ARN, or alias name to encrypt the secret in Secrets Manager. Defaults to the AWS-managed key when omitted.
cluster_master_user_secret output:
secret_arn field. To retrieve the password at runtime, first get the secret ARN from the Terraform output, then use the AWS CLI:
Using the secret ARN in other resources
Manual password (write-only)
When you need to supply your own password, disable managed passwords and use the ephemeralmaster_password_wo variable. This requires Terraform 1.11+.
Set to
false to disable RDS-managed passwords and provide master_password_wo instead.The master DB user password. This is a write-only ephemeral variable — Terraform does not store it in state. Required when
manage_master_user_password = false, unless restoring from a snapshot or using a global cluster secondary.An integer version counter used alongside
master_password_wo. Increment this value to trigger a password change on the next terraform apply.Password rotation
When using the managed password, you can configure automatic rotation through Secrets Manager.Whether the module manages automatic password rotation. When set to
false after previously being true, automatic rotation is disabled.Number of days between automatic scheduled rotations. Either this or
master_user_password_rotation_schedule_expression must be provided when rotation is enabled.A
cron() or rate() expression defining the rotation schedule. Either this or master_user_password_rotation_automatically_after_days must be provided.Length of the rotation window, e.g.
"3h" for three hours.Whether to rotate the secret immediately when the rotation configuration is applied, or wait for the next scheduled window.

