How did you handle secrets in Terraform?
AdvancedBehavioralInfrastructure as Code & Terraform state
Answer
Good answer looks like → "We didn't put secret values in Terraform where avoidable. RDS used manage_master_user_password = true so AWS generated and stored the password in Secrets Manager. When a secret had to pass through Terraform, we marked outputs sensitive = true, knowing the value still lands in state, which is why the state bucket was encrypted with KMS and tightly restricted."
Follow-ups to expect → Does sensitive keep the value out of state? Have you used ephemeral resources or write-only arguments?
Red flags → Passwords in .tfvars committed to Git.
More on Infrastructure as Code & Terraform state
What did your Terraform state setup look like?IntermediateHow did you structure your Terraform code?BeginnerWhy did you use folders per environment rather than Terraform workspaces (or vice versa)?IntermediateHow did different Terraform stacks share information?IntermediateDid you ever have a state lock or corrupted state? What did you do?AdvancedHow did you handle Terraform drift?Intermediate