Create HA VPN in Google cloud using gcloud commands

Rajathithan Rajasekar
4 min readAug 8, 2021
Photo by Designecologist from Pexels

Google cloud HA VPN provides secure network connectivity between your peer network and google cloud VPC. This peer network can be either your on-prem network or any other cloud network (including Google cloud). This post is on how to create this HA VPN connectivity on Google cloud side using gcloud commands.

Although there is an official documentation available in Google cloud on how to create the VPN gateway using console, gcloud and api, this post was created with the intention of ease of reference. The link is given below for your reference

Create a new Google cloud VPN Gateway:

gcloud compute vpn-gateways create corp-new-dc-vpn-gateway \
--network corp-new-dc-vpc \
--region us-central1

Create Peer Gateways:

Replace the stars with the peer gateway public ip address , if you have only one peer gateway ip address, you can give the same ip address for interface-0 and interface-1

gcloud compute external-vpn-gateways create corp-dc-peer-vpn-gateway --interfaces…

--

--

Rajathithan Rajasekar

I like to write code in Python . Interested in cloud , dataAnalysis, computerVision, ML and deepLearning. https://rajathithanrajasekar.medium.com/membership