INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 16–18 of 18 questions
Learn Terraform →16.How do you roll back a Terraform change?Mid
There is no rollback button. Revert the commit and apply again so the code puts things back. If the state file itself is broken, restore an earlier version from the backend's versioning (for example S3 versioning).
17.Why does my plan show a change every time even though nothing changed?Mid
Something differs on every run: a value like timestamp() in tags, another tool editing the same field, or the provider formatting a value differently (common with JSON policies). Fix the code, use jsonencode, or add ignore_changes for fields another system owns.
18.terraform apply says the resource already exists. Why?Mid
The resource exists in the cloud but not in state, because it was created by hand or the state was lost. Import it with an import block instead of creating it again.