Interview Prep/Real-World Interview/Infrastructure as Code & Terraform state

How did you handle Terraform drift?

IntermediateBehavioralInfrastructure as Code & Terraform state
Answer

Good answer looks like → "A nightly job ran terraform plan -detailed-exitcode per stack; exit code 2 means changes, which posted to Slack with the diff. For each drift we decided: if the manual change was right, codify it; otherwise apply to revert it. We reduced drift at the source by removing console write access for humans in production."

Follow-ups to expect → What was the most common source of drift? How do you handle attributes changed by AWS itself?

Red flags → Discovering drift only when an apply unexpectedly destroys something.

All Real-World Interview questions Roadmap: Interview readiness

More on Infrastructure as Code & Terraform state