tezvyn:

What is Infrastructure as Code?

AI-drafted, machine-checkedSource: interviewbeginner
WHAT IT TESTS

the case for declarative infrastructure.

OUTLINE

IaC defines infra in version-controlled files, giving repeatability, peer review, and drift-free consistency, unlike error-prone console clicks.

RED FLAG

calling it mere scripting.

WHAT THIS TESTS This checks whether you understand the operational and reliability case for treating infrastructure declaratively and managing it like software.

A GOOD ANSWER COVERS Infrastructure as Code means describing servers, networks, databases, and other cloud resources in machine-readable definition files that a tool reads and provisions automatically. Most tools are declarative: you state the desired end state and the tool computes the changes needed to reach it. The benefits over clicking through a console are substantial. Repeatability: you can stand up an identical environment for dev, staging, and prod from the same code, eliminating manual mistakes. Version control: definitions live in Git, so every change is reviewed, diffed, attributed, and revertible. Consistency: it prevents configuration drift and snowflake servers that nobody can reproduce. Speed and automation: provisioning hundreds of resources happens in one apply rather than hours of clicking. Documentation: the code itself is the source of truth for what exists. Collaboration: teams review infrastructure changes in pull requests like application code.

COMMON WRONG ANSWERS Describing IaC as just shell scripts that call the CLI; declarative tools track state and converge, scripts do not. Saying the console is fine because it is faster for one resource, ignoring repeatability at scale. Forgetting that IaC requires managing state and watching for drift. Conflating provisioning tools with configuration-management tools without distinction.

LIKELY FOLLOW-UPS What is the difference between declarative and imperative IaC? What is state and why does it matter? How does IaC detect and handle drift? How do reusable modules promote consistency?

ONE CONCRETE EXAMPLE A team needs an identical staging environment. With IaC they run one apply against the same code with a different variable file and get a byte-for-byte equivalent stack in minutes, versus an engineer manually recreating dozens of resources by hand with inevitable inconsistencies that later cause hard-to-debug environment-specific failures.

Read the original → ibm.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.