- A
Run 'terraform init -reconfigure' to ensure the local state is synchronized with the remote backend before planning.
Reconfiguring the backend pulls the latest state, ensuring the plan reflects current infrastructure.
- B
Set the 'skip_metadata_api_check' option in the provider to avoid changes.
Why wrong: This option is unrelated to state drift.
- C
Use 'terraform plan -target=aws_s3_bucket.bucket' to limit the plan to only the S3 bucket.
Why wrong: Targeting only the bucket would ignore the EC2 issue, but does not address the root cause.
- D
Run 'terraform plan -refresh=true' to refresh the state before planning.
Why wrong: Refresh is enabled by default; the issue is that the local state is outdated.
Quick Answer
The correct action is to run `terraform init -reconfigure` because this command forces Terraform to reinitialize the backend and discard any stale local state, re-downloading the latest state file from the remote S3 backend. This resolves the issue of backend reinitialization stale state, where a developer’s week-old local copy of the state file no longer matches the remote state that was updated two days ago, causing Terraform to detect phantom differences like an unrelated EC2 instance being replaced. On the HashiCorp Terraform Associate TF-003 exam, this scenario tests your understanding of state synchronization and the `-reconfigure` flag as a targeted fix for state drift without modifying infrastructure. A common trap is confusing `terraform refresh` with `init -reconfigure`; remember that `refresh` updates state in memory, while `-reconfigure` fully re-syncs the local backend connection. Memory tip: think “reconfigure = re-download the remote state” to avoid spurious destroy-and-recreate plans.
TF-003 Read, generate and modify configuration Practice Question
This TF-003 practice question tests your understanding of read, generate and modify configuration. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.
You are a DevOps engineer at a company that manages infrastructure for multiple environments (dev, staging, prod) using Terraform. Each environment has its own state file stored in an S3 backend with DynamoDB locking. The team recently adopted a policy of running 'terraform plan' in CI/CD pipelines to review changes before applying. However, developers have reported that sometimes the plan output shows that Terraform wants to destroy and recreate resources that were not modified in their code changes. For example, a developer added a new tag to an S3 bucket in the staging environment, but the plan also showed that an unrelated EC2 instance would be replaced. Upon investigation, you notice that the state file for staging was last modified two days ago, but the developer's branch is based on a commit from one week ago. Which action is most likely to resolve the issue and ensure that plans only reflect changes from the current configuration changes?
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.
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
Run 'terraform init -reconfigure' to ensure the local state is synchronized with the remote backend before planning.
Option A is correct because `terraform init -reconfigure` forces Terraform to reinitialize the backend and re-download the latest state file from the remote S3 backend, discarding any stale local copy. The developer's local state was based on a week-old commit, while the actual remote state had been updated two days ago, causing Terraform to detect spurious differences (e.g., an unrelated EC2 instance) due to state drift. This command ensures the local state matches the remote state before planning, so the plan only reflects changes from the current configuration.
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.
- ✓
Run 'terraform init -reconfigure' to ensure the local state is synchronized with the remote backend before planning.
Why this is correct
Reconfiguring the backend pulls the latest state, ensuring the plan reflects current infrastructure.
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.
- ✗
Set the 'skip_metadata_api_check' option in the provider to avoid changes.
Why it's wrong here
This option is unrelated to state drift.
- ✗
Use 'terraform plan -target=aws_s3_bucket.bucket' to limit the plan to only the S3 bucket.
Why it's wrong here
Targeting only the bucket would ignore the EC2 issue, but does not address the root cause.
- ✗
Run 'terraform plan -refresh=true' to refresh the state before planning.
Why it's wrong here
Refresh is enabled by default; the issue is that the local state is outdated.
Common exam traps
Common exam trap: answer the scenario, not the keyword
HashiCorp often tests the misconception that `terraform plan -refresh=true` (or the default refresh) is sufficient to synchronize state, when in fact it only updates the state against live infrastructure without re-downloading the remote state file, leaving stale local state intact.
Detailed technical explanation
How to think about this question
Terraform stores a cached copy of the state file in the `.terraform/terraform.tfstate` directory after `terraform init`. When the remote state is updated by another pipeline or user, the local cache becomes stale. `terraform init -reconfigure` deletes this cache and re-fetches the state from the backend, ensuring the plan is based on the latest state. In CI/CD, this is critical because multiple pipelines may modify the same state file concurrently, and stale caches lead to false positives in plan output, such as detecting resource replacement due to drift rather than configuration changes.
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.
- →
Read, generate and modify configuration — study guide chapter
Learn the concepts, then practise the questions
- →
Read, generate and modify configuration practice questions
Targeted practice on this topic area only
- →
All TF-003 questions
519 questions across all exam domains
- →
HashiCorp Terraform Associate TF-003 study guide
Full concept coverage aligned to exam objectives
- →
TF-003 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related TF-003 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Understand IaC concepts practice questions
Practise TF-003 questions linked to Understand IaC concepts.
Understand Terraform basics practice questions
Practise TF-003 questions linked to Understand Terraform basics.
Understand Terraform's purpose practice questions
Practise TF-003 questions linked to Understand Terraform's purpose.
Use Terraform outside the core workflow practice questions
Practise TF-003 questions linked to Use Terraform outside the core workflow.
Interact with Terraform modules practice questions
Practise TF-003 questions linked to Interact with Terraform modules.
Use the core Terraform workflow practice questions
Practise TF-003 questions linked to Use the core Terraform workflow.
Implement and maintain state practice questions
Practise TF-003 questions linked to Implement and maintain state.
Read, generate and modify configuration practice questions
Practise TF-003 questions linked to Read, generate and modify configuration.
TF-003 fundamentals practice questions
Practise TF-003 questions linked to TF-003 fundamentals.
TF-003 scenario practice questions
Practise TF-003 questions linked to TF-003 scenario.
TF-003 troubleshooting practice questions
Practise TF-003 questions linked to TF-003 troubleshooting.
Practice this exam
Start a free TF-003 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this TF-003 question test?
Read, generate and modify configuration — This question tests Read, generate and modify configuration — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Run 'terraform init -reconfigure' to ensure the local state is synchronized with the remote backend before planning. — Option A is correct because `terraform init -reconfigure` forces Terraform to reinitialize the backend and re-download the latest state file from the remote S3 backend, discarding any stale local copy. The developer's local state was based on a week-old commit, while the actual remote state had been updated two days ago, causing Terraform to detect spurious differences (e.g., an unrelated EC2 instance) due to state drift. This command ensures the local state matches the remote state before planning, so the plan only reflects changes from the current configuration.
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 →
Last reviewed: Jun 30, 2026
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.