CV0-004 Deployment Practice Question
A cloud engineer is managing infrastructure as code using Terraform. Which command should be run to preview changes before applying them to the cloud environment?
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 plan
The terraform plan command creates an execution plan, showing what actions Terraform will take to change the infrastructure. It is used as a dry run before applying changes.
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 apply
Why it's wrong here
terraform apply executes the changes, so it mutates real infrastructure rather than previewing them. It is tempting because it is the command that actually deploys, and it does show a plan for confirmation, but that prompt is not the dedicated preview step the question asks for.
- ✗
terraform destroy
Why it's wrong here
terraform destroy removes all managed infrastructure, the opposite of previewing changes. It is tempting because it also produces a plan and confirmation prompt, and it is the right command when decommissioning an entire environment, but it never shows proposed additions or modifications.
- ✓
terraform plan
Why this is correct
`terraform plan` performs a dry run that refreshes state and computes the execution plan, showing exactly which resources will be created, modified or destroyed without touching the cloud environment. This satisfies the stem's requirement to preview changes before applying them, unlike `terraform apply`, which executes them.
- ✗
terraform init
Why it's wrong here
terraform init downloads providers and initialises the working directory's backend; it generates no execution plan and contacts no resources for comparison. It is tempting as the first command in any workflow, and it is correct when setting up a new configuration or after changing modules or backends.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CV0-004 question from scratch — 834 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 CV0-004 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 CV0-004 exam.