nerdexam
HashiCorpHashiCorp

TERRAFORM-ASSOCIATE-004 · Question #34

TERRAFORM-ASSOCIATE-004 Question #34: Real Exam Question with Answer & Explanation

The correct answer is D: Terraform import. 'terraform import' is the command used to bring existing, manually created infrastructure resources under Terraform management by adding them to the Terraform state file. It maps a real-world resource to a resource block in your configuration. 'terraform init' initializes the wor

Submitted by tom_us· Apr 18, 2026Use Terraform CLI

Question

Which command add existing resources into Terraform state?

Options

  • ATerraform init
  • BTerraform plan
  • CTerraform refresh
  • DTerraform import
  • EAll of these

Explanation

'terraform import' is the command used to bring existing, manually created infrastructure resources under Terraform management by adding them to the Terraform state file. It maps a real-world resource to a resource block in your configuration. 'terraform init' initializes the working directory. 'terraform plan' previews changes. 'terraform refresh' updates the state to match the real-world infrastructure but does not import new resources into state. Only 'terraform import' adds a previously unmanaged resource into Terraform state.

Topics

#Terraform CLI#terraform import#Importing resources#Terraform state management

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 PracticeBrowse All TERRAFORM-ASSOCIATE-004 Questions