terraform import

--

purpose: to manage already created infrastrure also by manage by terraform

for that we will use terraform import command

we can import present infra into __resource block__ or __module blocks also__

In the main.tf

resource "google_compute_instance" "imported" {
}

to import that resource we will run the below command

terraform import google_compute_instance.imported <instance-name>

2. for module info [refer here](https://www.terraform.io/docs/commands/import.html)

--

--

Bala Bhaskara Rao Guntupalli
Bala Bhaskara Rao Guntupalli

No responses yet