HashiCorp Certified: Terraform Associate (003) — Question 19

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: C

Explanation

To manage existing VMs with Terraform, you need to write Terraform configuration that defines these VMs (option C). Additionally, you must use the terraform import command to bring the existing resources under Terraform management, which is not explicitly mentioned as an option here but is implied by the need to import them. Options A and D are incorrect because creating new VMs would not help in managing existing ones, and terraform import-gcp is not a valid command.