Infrastructure as Code (IaC)
Managing infrastructure through machine-readable definition files that tools apply automatically, so environments are built from code under version control instead of by hand.
Infrastructure as Code (IaC) describes infrastructure, such as virtual machines, networks, firewall rules, storage and cloud services, in definition files that automation tools read and apply. Terraform, AWS CloudFormation and Ansible are common examples. Because the files live in a code repository, each change to the infrastructure has a history, an author and a review, in the same way as application code.
The security benefits come from consistency. The same template builds each environment the same way, which reduces configuration drift and helps apply security baselines and hardening standards consistently. Changes can pass through change management as reviewed code, and scanners can check templates for misconfigurations, such as public storage or open management ports, before anything is deployed. The same property also spreads mistakes: one insecure template can be copied into many environments, and credentials written into templates can leak through the repository. Secrets management, least-privilege pipeline accounts and scanning in the CI/CD pipeline address those risks. NIST SP 800-218 includes configuration-as-code among the forms of code to be stored and protected.
Exam relevance: a scenario about identical, repeatable environments built from reviewed templates is likely to point to IaC. Candidates are expected to see both sides: it improves consistency and auditability, but a flaw in a template repeats wherever the template is used.