nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #112

How is terraform import run?

The correct answer is D. By an explicit call. 'terraform import' is a standalone command that must be invoked explicitly by the user. It is not triggered or executed automatically as part of 'terraform init', 'terraform plan', or 'terraform refresh'. When you run 'terraform import <resource_address> <resource_id>', Terraform

Submitted by olafpl· Apr 18, 2026Use Terraform CLI

Question

How is terraform import run?

Options

  • AAs a part of terraform init
  • BAs a part of terraform plan
  • CAs a part of terraform refresh
  • DBy an explicit call
  • EAll of the above

How the community answered

(35 responses)
  • A
    3% (1)
  • C
    6% (2)
  • D
    91% (32)

Explanation

'terraform import' is a standalone command that must be invoked explicitly by the user. It is not triggered or executed automatically as part of 'terraform init', 'terraform plan', or 'terraform refresh'. When you run 'terraform import <resource_address> <resource_id>', Terraform queries the provider for the existing resource and writes its state into the state file. Because it is a deliberate, explicit operation (and requires you to have already written the corresponding resource block in your config), it is always run as a direct call.

Topics

#terraform import#CLI commands#State management

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice