HashiCorp Certified: Terraform Associate — Question 5

You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with
Terraform and want to manage these VMs using Terraform instead.
What are the two things you must do to achieve this? (Choose two.)

Answer options

Correct answer: B, C

Explanation

The correct answers are B and C because you need to import the existing VMs into Terraform's state using the terraform import command (B) and also create a Terraform configuration that reflects the current setup of those VMs (C). Option A is incorrect because provisioning new VMs with the same names does not integrate the existing ones into Terraform, and option D is incorrect as there is no terraform import-gcp command; the correct command is terraform import.