nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #209

You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?

The correct answer is C. terraform import. The terraform import command allows Terraform to take existing infrastructure and bring it under Terraform's management. A (terraform get) is incorrect because it is used to fetch modules. B (terraform refresh) is incorrect because it only updates Terraform's state to match the…

Submitted by salim_om· Apr 18, 2026Manage Terraform State

Question

You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?

Options

  • Aterraform get
  • Bterraform refresh
  • Cterraform import
  • Dterraform init

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    5% (2)
  • C
    86% (36)
  • D
    7% (3)

Explanation

The terraform import command allows Terraform to take existing infrastructure and bring it under Terraform's management. A (terraform get) is incorrect because it is used to fetch modules. B (terraform refresh) is incorrect because it only updates Terraform's state to match the infrastructure but does not import resources. D (terraform init) is incorrect because it only initializes the Terraform working directory.

Topics

#terraform import#managing existing infrastructure#terraform state#CLI commands

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice