A security review finds the RDS master password in plain text in the Terraform state file in S3
IntermediateTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer
Likely causes → Terraform stores every attribute in state, including sensitive ones. sensitive = true only hides values from CLI output.
Diagnose →
terraform state pull | jq '.resources[] | select(.type=="aws_db_instance") | .instances[].attributes.password'
Fix → Rotate the password. Then remove it from Terraform entirely: manage_master_user_password = true makes RDS generate and store it in Secrets Manager. On Terraform 1.11+ with a recent provider you can also use write-only arguments such as password_wo, which are never persisted.
Prevent → Encrypt the state bucket with KMS, restrict s3:GetObject on state to CI roles, enable access logging, and treat state as a secret.
More on Secrets management: Vault, External Secrets and SOPS
`vault kv get secret/app/db` returns `Code: 403. Errors: * permission denied` although the policy allows `secret/app/*`BeginnerVault pod restarted and `vault status` shows `Sealed: true`; every app now fails to fetch secretsBeginnerPod stuck in `Init:0/1`; the `vault-agent-init` container logs `error authenticating: ... Code: 403 ... * permission denied`IntermediateAfter a cluster upgrade, Vault Kubernetes auth fails for every pod with `error validating token: invalid issuer (iss) claim`AdvancedPods annotated with `vault.hashicorp.com/agent-inject: true` start without a Vault sidecar, and the app fails on a missing fileBeginnerExternalSecret shows `SecretSyncedError` with `AccessDeniedException: ... is not authorized to perform: secretsmanager:GetSecretValue`Intermediate