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.
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?AdvancedWhat is the better pattern for RDS master passwords?BeginnerHow do you scope IAM for the Terraform deploy role?IntermediateWhat are dynamic provider credentials in HCP Terraform?Intermediate