nerdexam
HashiCorp

TA-002-P · Question #124

The current implementation of Terraform import can only import resources into the state. It does not generate configuration.

The correct answer is B. True. The current implementation of Terraform import can only import resources into the state. It does not generate configuration. A future version of Terraform will also generate configuration. Because of this, prior to running terraform import it is necessary to write manually a reso

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

The current implementation of Terraform import can only import resources into the state. It does not generate configuration.

Options

  • AFalse
  • BTrue

How the community answered

(66 responses)
  • A
    11% (7)
  • B
    89% (59)

Explanation

The current implementation of Terraform import can only import resources into the state. It does not generate configuration. A future version of Terraform will also generate configuration. Because of this, prior to running terraform import it is necessary to write manually a resource configuration block for the resource, to which the imported object will be mapped. While this may seem tedious, it still gives Terraform users an avenue for importing existing resources.

Topics

#terraform import#Terraform state#Configuration generation

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice