Interview Prep/Terraform/Secrets Provisioners and Policy as Code

How do you share a database password between a Terraform-created RDS and an app deployed by another tool?

AdvancedScenarioSecrets Provisioners and Policy as Code
Answer

Situation read → Both sides need the secret, neither should be hand-copied.

What I'd do →

  1. Let RDS manage the master secret (manage_master_user_password); output only the secret ARN.
  2. Grant the app's IAM role secretsmanager:GetSecretValue on that ARN.
  3. The app reads at runtime (External Secrets Operator on Kubernetes works well).

Why → The value never passes through Terraform outputs, pipelines or Git.

Interview tip → Share ARNs and names, not values.

All Terraform questions

More on Secrets Provisioners and Policy as Code