Skip to content
RED SAGSkills
easyDevOps Engineer interview question

What is Infrastructure as Code and why is it better than creating resources by clicking in the cloud console?

What the interviewer wants to hear

  • Infrastructure defined in version-controlled files
  • Repeatable and consistent environments
  • Code review and audit history
  • Plan before apply; detect drift
  • Declarative tools like Terraform, OpenTofu, Pulumi or CloudFormation

Model answer

Infrastructure as Code means we describe servers, networks, databases and permissions in files, for example Terraform or OpenTofu code, and a tool creates them for us. Because the files live in Git, every change goes through a pull request, gets reviewed, and has a history we can audit or revert. It makes environments repeatable: staging and production can be built from the same modules with different variables, so they do not slowly become different. Before applying, terraform plan shows exactly what will change, which reduces surprises. We can also detect drift when someone changes something by hand. Clicking in the console is fine for learning, but it is slow, error-prone, hard to reproduce after a disaster, and nobody knows why a setting was changed.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy DevOps Engineer questions