Courseiva
easyMultiple Choice

CAS-004 Practice Question: The primary benefit of using infrastructure as…

What is the primary benefit of using infrastructure as code (IaC) tools like Terraform for cloud resource provisioning?

⚠ Common exam trap

Common pitfall: Candidates often select a secondary benefit (like cost reduction or automated patching) instead of the primary benefit of IaC, which is declarative, version-controlled repeatability.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

It provides a declarative language to define resources, enabling version control and repeatability.

Infrastructure as Code (IaC) tools like Terraform use a declarative language (HCL) to define cloud resources in configuration files. This approach enables version control (e.g., Git), repeatable deployments, and consistent environments, which are the primary benefits of IaC over manual provisioning.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    It reduces cloud costs by optimizing resource usage.

    Why it's wrong here

    Terraform declares and versions infrastructure; it does not analyse utilisation or rightsize instances, so cost optimisation is not its mechanism. Cost reduction is tempting because IaC enables consistent teardown of unused resources, but that is a side effect. Cost optimisation is the domain of AWS Cost Explorer and Trusted Advisor.

  • ✗

    It eliminates the need for manual configuration management.

    Why it's wrong here

    Terraform still requires you to author configuration; it replaces manual console clicking with declarative code, not configuration management itself. Elimination is tempting because state files track resources, yet drift and in-guest settings still need handling. Configuration management tools such as Ansible or Chef remain necessary.

  • ✓

    It provides a declarative language to define resources, enabling version control and repeatability.

    Why this is correct

    Terraform's declarative HCL describes desired end state rather than imperative steps, so configurations live in version control and produce identical, repeatable provisioning. This satisfies the auditability and consistency requirement that manual console provisioning cannot deliver.

  • ✗

    It automatically applies security patches to resources.

    Why it's wrong here

    Terraform provisions and configures resources declaratively; patching running operating systems is performed by AWS Systems Manager Patch Manager or similar tooling. Automatic patching is tempting because IaC can bake hardened images, but that is build-time, not ongoing patch application. Patch management remains a separate operational concern.

About these practice questions

One of 973 original CAS-005 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.