Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 35 of 112
Free Preview · 112 of 371 · questions 1–112 of 371 are free. Sign up free to sync your progress across devices.
Select 2 answers.
This question asks for 2 answers, but our data marks only 1. Compare with the community discussion below for the full answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Terraform is yet to find a solution to import the configuration of the existing resources. So you need to write the configuration and terraform import will update the state file only. BC is correct.
To manage the VMs that were provisioned using the gcloud command line tool using Terraform, you must first use the "terraform import" command to import the existing VMs into Terraform's state file. This allows Terraform to recognize the VMs and manage them as part of your infrastructure. After importing the VMs, you must then write Terraform configuration for the existing VMs. This includes defining the resources for the VMs and specifying the necessary configuration options, such as the instance type and image, as well as any other desired settings. By doing this, you can manage the VMs using Terraform, which provides a single, unified tool for provisioning, configuring, and managing your infrastructure.
there is no 'import-gcp' in terraform official doc