Interview Prep/Terraform/Security, Secrets and Access

Plan output in CI logs leaked a secret. What now?

AdvancedProductionSecurity, Secrets and Access
Answer

Rotate the secret immediately, purge or restrict the logs, and find the leak path: an attribute printed in the plan (not all attributes are marked sensitive by providers), a local-exec echo, or debug logging (TF_LOG=TRACE prints request bodies). Fix by marking inputs sensitive, avoiding secrets in resource arguments, enabling log masking in CI and never using TRACE logs in shared pipelines.

All Terraform questions Roadmap: Terraform in production

More on Security, Secrets and Access