Which action brings external resources under Terraform management by creating an entry in the state file?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

Multiple Choice

Which action brings external resources under Terraform management by creating an entry in the state file?

Explanation:
Bringing an external resource under Terraform management is done by importing it into the state. The import operation creates a linkage in Terraform’s state file between the real-world resource and the corresponding resource block in your configuration. Once the resource is represented in state, Terraform can track it, plan changes, and apply updates according to your configuration. Destroy would remove the resource (and its state entry), refresh updates the state with the current real-world attributes, and initializing the backend sets up where Terraform stores its state without touching individual resources.

Bringing an external resource under Terraform management is done by importing it into the state. The import operation creates a linkage in Terraform’s state file between the real-world resource and the corresponding resource block in your configuration. Once the resource is represented in state, Terraform can track it, plan changes, and apply updates according to your configuration.

Destroy would remove the resource (and its state entry), refresh updates the state with the current real-world attributes, and initializing the backend sets up where Terraform stores its state without touching individual resources.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy