easyMultiple Choice
CAS-004 Practice Question: Automate the creation of IAM roles and policies…
A company wants to automate the creation of IAM roles and policies in AWS using infrastructure as code. Which tool is specifically designed for provisioning cloud infrastructure across multiple providers?
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
✓
Terraform
Terraform is a IaC tool focused on provisioning resources across cloud providers. Docker handles containers, Ansible is configuration management, and Jenkins is CI/CD.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Terraform
Why this is correct
Terraform uses declarative HCL and a provider plugin model to provision infrastructure across AWS, Azure and others from one workflow, with state tracking for drift. This satisfies the stem's multi-provider requirement, unlike cloud-native tools such as CloudFormation that target a single vendor.
- ✗
Jenkins
Why it's wrong here
Jenkins is a CI/CD automation server that runs build and deployment pipelines; it does not itself model or provision cloud resources declaratively. It is tempting because pipelines often invoke Terraform, but Jenkins orchestrates jobs rather than maintaining infrastructure state across providers.
- ✗
Docker
Why it's wrong here
Docker packages and runs containers on a host; it has no provider model for declaring AWS IAM roles and policies. It is tempting because containers are central to cloud deployment, but image building is unrelated to provisioning infrastructure as code across multiple cloud providers.
- ✗
Ansible
Why it's wrong here
Ansible configures servers and applications over SSH or WinRM using procedural playbooks; it lacks native declarative state tracking for AWS IAM resources. It is tempting because it does support cloud modules, but Terraform's provider-based state file is what provisions multi-cloud infrastructure as code.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CAS-005 question from scratch — 973 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.