CompTIA Linux+ (XK0-006)Automation, Orchestration and ScriptingEasy
A team is designing a new application and needs to define its infrastructure components (virtual machines, networks, storage) in a declarative way, ensuring consistency across different environments and enabling version control of the infrastructure itself. They want to use a tool that treats infrastructure definitions as code. Which concept are they primarily adopting?
- AConfiguration Management
- BContainerization
- CServerless Computing
- DInfrastructure as Code (IaC)
Show answer & explanationAnswer & explanation
Correct answer: D. Infrastructure as Code (IaC)
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. It allows infrastructure to be treated like application code, enabling version control, automation, and consistent deployments.
Why the other options are wrong
- A. Configuration Management (e.g., Ansible, Puppet) focuses on configuring *already existing* servers, not defining the underlying infrastructure components.
- B. Containerization (e.g., Docker) packages applications and their dependencies, but doesn't define the virtual machines, networks, or storage they run on.
- C. Serverless Computing is an execution model where the cloud provider dynamically manages the allocation and provisioning of servers, but the *definition* of the underlying resources (if any) could still be done via IaC.
Infrastructure as Code (IaC)
Infrastructure as Code (IaC) is the management of infrastructure (networks, virtual machines, load balancers, etc.) in a descriptive model, using the same versioning and deployment principles as application code.
- Uses declarative definition files (e.g., YAML, JSON, HCL).
- Enables automation, consistency, and repeatability.
- Supports version control, code reviews, and testing for infrastructure.
- Examples: Terraform, CloudFormation, Azure Resource Manager.
Memory trick: Infrastructure: as Code, it's defined and then deployed.