Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

5.2. Infrastructure as Code (IaC)

Infrastructure as Code treats system configuration as software — version-controlled, peer-reviewed, tested, and deployed consistently. The core value is idempotency: running the same IaC definition twice produces the same result, whether the system is brand new or already configured. This property is what makes IaC safe to run repeatedly — it converges to the desired state without causing damage if the state is already correct.

💡 First Principle: Imperative automation says "run these steps in this order." Declarative IaC says "here is the desired state — achieve it." The declarative approach is more robust: it doesn't matter what the current state is (provisioned, partially configured, already correct) — the tool handles convergence. Ansible is primarily declarative (desired state via modules); bash scripts are typically imperative.

⚠️ Common Misconception (M8): git push does not push all local branches by default — it pushes the current branch to its configured upstream. git push origin main pushes specifically the main branch to origin. git push --all pushes all branches. Many candidates assume git push syncs everything.

Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications