- A
Use 'terraform validate' to automatically import resources.
Why wrong: Validate checks configuration syntax; it does not import.
- B
Use 'terraform state rm' to remove resources from state, then re-add them.
Why wrong: This removes resources, it does not import.
- C
Use the 'terraform import' command with the resource address and ID.
This is the primary method for importing existing resources.
- D
Write the configuration manually and run 'terraform plan' to refresh state, then adjust.
This is a valid workflow for importing resources that are already in state.
- E
Run 'terraform apply' with an empty configuration to detect resources.
Why wrong: This will not detect resources; it will create nothing.
Quick Answer
The correct answers are using the `terraform import` command and manually writing configuration then running `terraform plan` to refresh state and adjust. The `terraform import` command is the dedicated, explicit method to bring existing infrastructure under Terraform management by binding a real-world resource ID to a resource address in your state file, making it the primary tool for this task. Alternatively, you can manually author configuration that mirrors the existing resource and then execute `terraform plan`; this forces Terraform to refresh its state against the live infrastructure, and you iteratively adjust your config until the plan shows zero changes, effectively importing by convergence. On the HashiCorp Terraform Associate TF-003 exam, this question tests your understanding of the two valid workflows for importing existing infrastructure, often trapping candidates who think only `terraform import` works or who confuse `terraform refresh` as a standalone import method. A key memory tip: think of import as either “explicit bind” with `terraform import` or “convergent match” with manual config plus plan.
TF-003 Use Terraform outside the core workflow Practice Question
This TF-003 practice question tests your understanding of use terraform outside the core 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.
Which TWO of the following are valid ways to import existing infrastructure into Terraform management? (Choose TWO.)
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
Use the 'terraform import' command with the resource address and ID.
Option C is correct because 'terraform import' is the dedicated command to bring existing infrastructure under Terraform management by associating a real-world resource ID with a resource address in state. Option D is correct because you can manually write configuration that matches the existing resource, then run 'terraform plan' to refresh state and detect any drift, allowing you to adjust the configuration until the plan shows no changes.
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.
- ✗
Use 'terraform validate' to automatically import resources.
Why it's wrong here
Validate checks configuration syntax; it does not import.
- ✗
Use 'terraform state rm' to remove resources from state, then re-add them.
Why it's wrong here
This removes resources, it does not import.
- ✓
Use the 'terraform import' command with the resource address and ID.
Why this is correct
This is the primary method for importing existing resources.
Related concept
Read the scenario before looking for a memorised answer.
- ✓
Write the configuration manually and run 'terraform plan' to refresh state, then adjust.
Why this is correct
This is a valid workflow for importing resources that are already in state.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Run 'terraform apply' with an empty configuration to detect resources.
Why it's wrong here
This will not detect resources; it will create nothing.
Common exam traps
Common exam trap: answer the scenario, not the keyword
HashiCorp often tests the misconception that 'terraform validate' or 'terraform apply' can import resources, when in fact only 'terraform import' (or manual configuration with plan refresh) accomplishes this, and candidates confuse validation or apply with the import workflow.
Detailed technical explanation
How to think about this question
Under the hood, 'terraform import' writes the resource's current attributes into the state file using the provider's Read function, but it does not generate HCL configuration; you must write the configuration block manually. In real-world scenarios, teams often combine manual configuration with 'terraform plan' to iteratively match the imported state, using the plan's diff output to correct attribute values until the plan is empty. A subtle behavior is that 'terraform import' only works for resources that have a unique identifier in the provider's API, and some resources require multiple IDs or special syntax.
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 Terraform outside the core workflow — study guide chapter
Learn the concepts, then practise the questions
- →
Use Terraform outside the core workflow 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?
Use Terraform outside the core workflow — This question tests Use Terraform outside the core workflow — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Use the 'terraform import' command with the resource address and ID. — Option C is correct because 'terraform import' is the dedicated command to bring existing infrastructure under Terraform management by associating a real-world resource ID with a resource address in state. Option D is correct because you can manually write configuration that matches the existing resource, then run 'terraform plan' to refresh state and detect any drift, allowing you to adjust the configuration until the plan shows no changes.
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.
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 →
Same concept, more angles
2 more ways this is tested on TF-003
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which TWO of the following are valid methods for importing existing infrastructure into Terraform management? (Choose two.)
easy- A.Use terraform apply directly on existing resources
- ✓ B.Use a third-party tool like Terraformer to generate configuration
- C.Use terraform state push to manually add state entries
- ✓ D.Write configuration for the resource and use terraform import
- E.Use terraform import without any prior configuration
Why B: The typical method is to write configuration and run terraform import. Third-party tools can generate configuration from existing resources. terraform import requires configuration beforehand. terraform state push is not for importing; it pushes a state file. terraform apply would try to create new resources.
Variation 2. Which TWO are valid methods to import existing infrastructure into Terraform?
medium- A.Use 'terraform state rm' to remove existing state before running apply.
- ✓ B.Run 'terraform import' with the resource address and ID.
- C.Use 'terraform console' to inspect and import.
- ✓ D.Add resource blocks manually and run 'terraform import' for each resource.
- E.Use 'terraform init -migrate-state' to import from another backend.
Why B: Options B and D are correct. B involves writing resource blocks manually and then using terraform import. D is the direct import command. A is not a command. C migrates state, not imports. E is not for import.
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.