You can create a HA VPN gateway without the following resources and configure those resources later.
You must create these resources before your gateway can become operational.
Create an HA VPN gateway. When the gateway is created, two external IP addresses are automatically allocated, one for each gateway interface.
In the following commands, replace the options as noted below:
-
Replace network with the name of your GCP network.
-
Replace region with the GCP region where you need to create the gateway and tunnel.
-
Replace gw-name with the name of the gateway.
gcloud compute vpn-gateways create gw-name \ --network network \ --region region
The gateway you create should look similar to the following example output. Note that a public IP address has been automatically assigned to each gateway interface:
Created [https://www.googleapis.com/compute/v1/projects/project-id/regions/us-central1/vpnGateways/ha-vpn-gw-a].
NAME INTERFACE0 INTERFACE1 NETWORK REGION
ha-vpn-gw-a 203.0.113.16 203.0.113.23 network-a us-central1