14 Introduction to Infrastructure as Code
This chapter introduces Infrastructure as Code (IaC), the practice of managing and provisioning computing infrastructure through machine-readable definition files rather than physical hardware configuration or interactive configuration tools.
Learning Objectives
- Define Infrastructure as Code and its benefits (Version Control, Reproducibility)
- Differentiate between Imperative and Declarative approaches
- Learn the basics of Terraform (Providers, Resources, State)
- Understand Ansible for configuration management
Automating the Cloud
Manual configuration (“ClickOps”) is error-prone and unscalable. IaC allows developers to treat infrastructure as software—enabling code review, testing, and automated deployment of the entire data center stack.