Exam Terraform-Associate-004 Topic 6 Question 178 Discussion
Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 178
Topic #: 6
Question #: 178
Topic #: 6
What's the proper syntax for the plan command?
Suggested Answer: D Vote an answer
Rationale for Correct Answer: To save an execution plan to a file, Terraform uses the -out flag: terraform plan
-out=tfplan. That produces a plan file that can later be applied with terraform apply tfplan.
Analysis of Incorrect Options (Distractors):
A: This is an apply command with a variable file flag; it does not create a plan file.
B: -target expects a resource address (like aws_instance.example), not a plan filename.
C: -generate-config-out is used with configuration generation workflows (e.g., from import), not for saving a plan.
Key Concept: Creating and saving plan files with terraform plan -out=....
Reference: Terraform Objectives - Understand Terraform Basics and CLI (plan/apply workflow and plan files).
-out=tfplan. That produces a plan file that can later be applied with terraform apply tfplan.
Analysis of Incorrect Options (Distractors):
A: This is an apply command with a variable file flag; it does not create a plan file.
B: -target expects a resource address (like aws_instance.example), not a plan filename.
C: -generate-config-out is used with configuration generation workflows (e.g., from import), not for saving a plan.
Key Concept: Creating and saving plan files with terraform plan -out=....
Reference: Terraform Objectives - Understand Terraform Basics and CLI (plan/apply workflow and plan files).
by Geoffrey at Aug 20, 2026, 10:51 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).