CLO-002 practice question 30 of 30

For which of the following reasons is the infrastructure as code technique used?

Full set: 218 questions
Answer options
A: To improve the ability to migrate applications to different cloud providers to avoid vendor lock-in.
B: To specify the hardware configuration and system installation procedures in machine-readable formats.
C: To capture the system configurations to track changes and remediate configuration drift. Correct answer
D: To assign server administration responsibilities to software developers for application deployments.
Correct Answer:
C. To capture the system configurations to track changes and remediate configuration drift.
Explanation

Infrastructure as Code (IaC) is the practice of managing and provisioning infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. A primary reason for its adoption is to combat "configuration drift," which occurs when manual, ad-hoc changes cause a production environment to deviate from its original, intended state. By defining the desired state in code and storing it in a version control system, organizations create a single source of truth. This allows them to track every change, enforce consistency across all environments (development, testing, production), and automatically re-apply the correct configuration to remediate any unauthorized or undocumented modifications.

Why Incorrect

A. While some IaC tools are cloud-agnostic and can help with portability, provider-specific tools (e.g., AWS CloudFormation, Azure Resource Manager) can increase vendor lock-in.
B. This statement describes what Infrastructure as Code is—a machine-readable definition of infrastructure—but not the primary reason or benefit for using the technique.
D. This describes a potential organizational shift associated with DevOps, which IaC enables, but it is not the fundamental purpose of the IaC technique itself. ---

References

1. Microsoft Azure Documentation. "What is infrastructure as code (IaC)?" This official vendor documentation states, "IaC helps to avoid undocumented, ad-hoc configuration changes." This directly addresses the problem of configuration drift, which is the core concept in the correct answer. (Source: Microsoft Azure, "DevOps solutions," Infrastructure as code section).

2. AWS Whitepaper. "Overview of DevOps on AWS," July 2020. On page 10, under the "Infrastructure as Code" section, the document states, "This practice also helps to prevent problems like configuration drift or the need to maintain separate configuration for environments that are supposed to be the same." This explicitly identifies the remediation of configuration drift as a key benefit.

3. National Institute of Standards and Technology (NIST). Special Publication (SP) 800-190, "Application Container Security Guide," November 2017. In Section 3.1.2, "Orchestrators," it discusses IaC, stating, "This helps ensure that environments are created in a consistent, repeatable manner, which reduces the risk of errors and security issues from manual configuration processes." This supports the principle of using code to enforce a consistent state and prevent drift.

Scroll to Top