TF-003 Use the core Terraform workflow Practice Question
This TF-003 practice question tests your understanding of use the core terraform workflow. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
```
Error: Error applying plan!
on main.tf line 12, in resource "aws_instance" "web":
12: ami = "ami-0c55b159cbfafe1f0"
The resource "aws_instance" "web" was successfully created but failed to initialize after creation. The following errors may help:
Error: timeout - last error: SSH connection failed (unreachable)
```
An operator runs terraform apply and receives the exhibit error. The instance was created but Terraform reports a failure. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Refer to the exhibit.
```
Error: Error applying plan!
on main.tf line 12, in resource "aws_instance" "web":
12: ami = "ami-0c55b159cbfafe1f0"
The resource "aws_instance" "web" was successfully created but failed to initialize after creation. The following errors may help:
Error: timeout - last error: SSH connection failed (unreachable)
```
A
The state file is locked and cannot be updated
Why wrong: State locking would cause a different error, not a timeout after creation.
B
The AMI ID is incorrect and the instance failed to boot
Why wrong: If the AMI were invalid, the instance would not have been created at all.
C
The AWS API returned an error during instance creation
Why wrong: The error indicates the instance was created successfully, so the API call succeeded.
D
A provisioner block is configured to wait for SSH, but the instance is not reachable
Terraform provisioners can cause timeouts if the instance is not accessible after creation.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A provisioner block is configured to wait for SSH, but the instance is not reachable
The error indicates that the instance was created successfully but Terraform reports a failure during the apply phase. This typically occurs when a provisioner block (e.g., file or remote-exec) is configured to wait for SSH connectivity, but the instance is not reachable within the timeout period. Terraform marks the resource as 'tainted' and reports a failure, even though the cloud resource itself was provisioned.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The state file is locked and cannot be updated
Why it's wrong here
State locking would cause a different error, not a timeout after creation.
✗
The AMI ID is incorrect and the instance failed to boot
Why it's wrong here
If the AMI were invalid, the instance would not have been created at all.
✗
The AWS API returned an error during instance creation
Why it's wrong here
The error indicates the instance was created successfully, so the API call succeeded.
✓
A provisioner block is configured to wait for SSH, but the instance is not reachable
Why this is correct
Terraform provisioners can cause timeouts if the instance is not accessible after creation.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
HashiCorp often tests the distinction between resource creation failures (which prevent the resource from existing) and provisioner failures (which occur after creation and leave the resource running but tainted), leading candidates to incorrectly select an API error or AMI issue when the instance clearly exists.
Detailed technical explanation
How to think about this question
Provisioners in Terraform run after the resource is created and the provider reports success. The 'remote-exec' provisioner uses SSH (port 22) or WinRM to connect; if the instance is behind a security group that blocks ingress, or if the SSH key pair is misconfigured, the connection will timeout after the configured 'timeout' value (default 5 minutes). Terraform then marks the resource as 'tainted' and returns an error, but the cloud resource remains in the state file and continues running.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the TF-003 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Use the core Terraform workflow — This question tests Use the core Terraform workflow — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: A provisioner block is configured to wait for SSH, but the instance is not reachable — The error indicates that the instance was created successfully but Terraform reports a failure during the apply phase. This typically occurs when a provisioner block (e.g., file or remote-exec) is configured to wait for SSH connectivity, but the instance is not reachable within the timeout period. Terraform marks the resource as 'tainted' and reports a failure, even though the cloud resource itself was provisioned.
What should I do if I get this TF-003 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This TF-003 practice question is part of Courseiva's free HashiCorp 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 TF-003 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.