I am trying to create resources and services on google cloud using terraform. following up this guide
https://cloud.google.com/docs/terraform/get-started-with-terraform
In this guide we create a vpc network and then a subnet and then the vm.
Then we can attach the vm to the subnet we created. But suppose that I don't want to create a new vpc network instead I want to attach the vm with the default network which is already present. I have to change this parameter
network_interface { | |
subnetwork = google_compute_subnetwork.default.id | |
access_config { | |
# Include this section to give the VM an external IP address | |
} | |
} |
How would I do it? What should I provide in subnetwork = google_compute_subnetwork.***********
Solved! Go to Solution.