Why do SRE teams manage infrastructure with code tools such as Terraform instead of clicking in a cloud console?
What the interviewer wants to hear
- Changes are repeatable and environments stay consistent
- Code review and plan output catch mistakes before they happen
- Version history gives an audit trail and easy rollback
- Drift between code and reality can be detected
- Infrastructure can be rebuilt quickly after a disaster
Model answer
Clicking in a console is fast once but hard to repeat, review or undo. With Terraform the desired infrastructure lives in version control, so every change goes through a pull request where teammates can review the code and the terraform plan output, which shows exactly what will be created, changed or destroyed. That catches mistakes like an accidental delete before they reach production. Git history becomes an audit trail and makes rollback simpler. Because the same modules build staging and production, environments stay consistent, and we can rebuild a region quickly after a disaster. Terraform also detects drift when someone changes a resource by hand. We keep the state in a remote backend with locking so that two people cannot apply at the same time.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Site Reliability Engineer questions
- Explain the difference between an SLI, an SLO and an SLA, with an example.
- What is an error budget and how does a team use it?
- What are the four golden signals, and why are they useful for monitoring?
- You are on call and get paged for a high error rate. What are your first steps?
- What is toil, and how would you reduce it on your team?
- What is the difference between monitoring and observability, and what are metrics, logs and traces each good for?
- Explain blue-green and canary deployments. When would you choose each?
- You are asked to build the main Grafana dashboard for a web API. What would you put on it, and how would you lay it out?
- What makes an on-call rotation healthy and sustainable for the engineers on it?