What is the better pattern for RDS master passwords?
BeginnerProductionSecurity, Secrets and Access
Answer
Set manage_master_user_password = true so RDS generates and rotates the password in Secrets Manager. Terraform never sees it. Applications fetch it by secret ARN (output the ARN), and rotation happens without a Terraform apply. This avoids both random_password in state and password drift.
More on Security, Secrets and Access
How do you avoid hardcoded credentials in Terraform?BeginnerIs reading a secret with a data source safe?IntermediateHow do ephemeral resources and write-only arguments keep secrets out of state?AdvancedHow do you scope IAM for the Terraform deploy role?IntermediateWhat are dynamic provider credentials in HCP Terraform?IntermediateHow do you defend against supply-chain risk in providers and modules?Advanced