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 1–5 of 5 questions
Learn Terraform →1.What is infrastructure as code, and why use it?Beginner
It means describing servers, networks and other cloud things in files instead of clicking in a console. The files live in Git, so changes are reviewed, repeatable and have history. You can build the same setup again for dev, prod or disaster recovery.
2.What do terraform init, plan and apply each do?Beginner
init downloads providers and sets up the backend. plan compares your code with the state and shows what would change, without changing anything. apply makes those changes. Saving the plan with -out and applying that file makes sure you apply exactly what was reviewed.
3.What is a provider?Beginner
A plugin that knows how to talk to one platform's API, such as AWS, Azure, GitLab or Kubernetes. You choose it and its version in required_providers, and init downloads it.
4.What is the difference between a variable, a local and an output?Beginner
A variable is an input from outside. A local is a named value worked out inside the code. An output is a result shown to you or read by other code.
5.What is the state file, and why does it matter?Beginner
State records which real resource each block in your code manages, plus its settings. Terraform compares it with your code and the real cloud to decide what to change. Losing it means Terraform no longer knows what it owns.