HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #137
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
The correct answer is C. Before you run terraform Import. You need to write Terraform configuration files for the existing infrastructure that you want to import into Terraform, otherwise Terraform will not know how to manage it. The configuration files should match the type and name of the resources that you want to import.
Submitted by tyler.j· Apr 18, 2026Use Terraform CLI
Question
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
Options
- AYou can import infrastructure without corresponding Terraform code
- BTerraform will generate the corresponding configuration files for you
- CBefore you run terraform Import
- DAfter you run terraform import
How the community answered
(41 responses)- A5% (2)
- B2% (1)
- C90% (37)
- D2% (1)
Explanation
You need to write Terraform configuration files for the existing infrastructure that you want to import into Terraform, otherwise Terraform will not know how to manage it. The configuration files should match the type and name of the resources that you want to import.
Topics
#terraform import#existing infrastructure#configuration files#resource block
Community Discussion
No community discussion yet for this question.