Initially, the instances in the subnets created will not have connectivity. We'll setup a VPN connection and verify that we are able to establish a connection between the instances in the two separate networks:
- Let's create a VM in the subnet alpha-subnet-vpn with default attributes:
gcloud beta compute instances create "alpha-instance" --zone"us-east1-c" --machine-type "n1-standard-1" --subnet"alpha-subnet-vpn" --image "debian-9-stretch-v20171213"--image-project "debian-cloud"
- Similarly, let's create another VM in the beta-subnet-vpn:
gcloud beta compute instances create "beta-instance" --zone"us-central1-c" --machine-type "n1-standard-1" --subnet"beta-subnet-vpn" --image "debian-9-stretch-v20171213"--image-project "debian-cloud" ...