CrackOps
Interview PrepTracksLinuxAWS LabSoonInterview RoomSoon
Sign inStart free
CrackOps

Interview prep for the people who keep production up.

[email protected]
ProductInterview PrepTracksDashboardInterview Room
RolesDevOpsSREPlatformCloud
CompanyAboutContactPrivacyTerms
© CrackOps
Tracks/Terraform & IaC
Advanced 2 minScenario based

How do you handle Terraform state drift in production?

Scenario

A teammate made emergency manual changes to AWS during an incident without updating Terraform. Now your state is out of sync.

The interviewer asks

“Your team discovers that the actual AWS infrastructure has diverged from your Terraform state file. Resources were manually changed or deleted. How do you handle this safely?”

The 30-second answer

Run terraform plan to detect drift, use terraform import to bring manually-created resources into state, use terraform state rm for removed resources, never delete state blindly. Always work with a team and lock state.

Sign in to finish this question

A free account unlocks the rest of it, and saves your progress across every track.

  • The voiced mock interview (2 min)
  • The full senior answer, step by step
  • Animated architecture diagrams
  • The whole conversation, 4 turns
  • Deep dive: how it works, mistakes, risks and trade-offs
  • 1 copy-ready command snippet
  • 2 follow-up questions they'll ask next
  • A self-check of 5 things interviewers listen for
Create a free accountSign in

Linux commands for this track

  • terraform init Prepare a Terraform working directory
  • terraform plan Preview what Terraform will change
  • terraform apply Create, change or destroy real infrastructure
  • terraform state Inspect and repair Terraform's state
  • ansible Run one task across many servers (ad-hoc)
  • ansible-playbook Run Ansible playbooks to configure servers
  • puppet Enforce server configuration with Puppet