Learning Objectives
By the end of this chapter, you will be able to:
- Define Infrastructure as Code, distinguish it from manual provisioning and configuration management, and identify the declarative-versus-imperative line on which Terraform sits
- Describe the advantages of IaC patterns including version control, reproducibility, change visibility, drift detection, blast-radius control, and self-service collaboration
- Explain how Terraform's plugin-based provider model and single core workflow let one set of HCL configurations target multi-cloud, hybrid-cloud, and service-agnostic infrastructure with the same
init,plan, andapplycycle
Executive Summary
- Infrastructure as Code captures the desired state of infrastructure in version-controlled, declarative source files; tools then reconcile real systems to match that desired state
- The pattern produces gains on five axes: speed, repeatability, auditability, recoverability, and collaboration; the same five axes are the language the exam uses to test "advantages"
- Terraform implements IaC through a provider-plugin architecture: one CLI, one configuration language (HCL), one workflow, but more than a thousand providers that translate generic resource declarations into provider-specific API calls
- That plugin model is what makes Terraform service-agnostic: cloud providers, on-premises hypervisors, SaaS platforms, DNS, monitoring, identity, and source-control systems are all configured with the same
resourceanddatablocks against different providers
Assumptions
- The reader is familiar with general IT vocabulary (virtual machine, network, IAM role, database) and has used at least one cloud console interactively
- "Terraform" in this chapter means open-source CLI Terraform unless explicitly qualified as HCP Terraform; HCP Terraform is the renamed hosted product that this course covers later
- All command examples assume Terraform 1.12 from the official binary release
- "Provider" in this chapter always means a Terraform provider plugin, never a cloud vendor in the marketing sense
