You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a drop-in Terraform module that sets up a HA VPN between GCP and Oracle Cloud Infrastructure (OCI).
Features
Establishes a HA VPN on the GCP side with two or four tunnels. (Refer to the documentation for more information.)
Sets up two Site-to-Site VPN connections on the OCI side with two connections each.
Configures both sides to establish BGP sessions, allowing the two platforms to automatically learn routes from each other.
Propagates proper routes from the GCP side to enable Private Google Access from OCI.
Installation
On the OCI side: Create a compartment and a Distributed Routing Gateway (DRG).
On the GCP side: Set up a project and a VPC network.
Example usage
module"vpn" {
source="registry.terraform.io/cagataygurturk/oci-vpn/google"version="1.0.0"providers={
google = google
oci = oci
}
gcp_network_name=var.gcp_network_namegcp_project_id=var.gcp_project_idgcp_vpn_region=var.gcp_vpn_regionoci_compartment_id=var.oci_compartment_idoci_drg_id=var.oci_drg_id
}
Notes on high availability
For an HA VPN, Google Cloud creates two IP addresses that must be utilized by at least one tunnel each. When a Site-to-Site VPN is installed on the OCI side, two tunnels are created with diverse IPs. However, OCI does not support assigning these IPs to connect to two different Customer Premise Equipments (CPE). To overcome this limitation, this module deploys two Site-to-Site VPNs, creating four OCI tunnels in total. The module also provides the option to create four tunnels on the GCP side (two for each GCP VPN IP). By selecting this option, full high availability and higher bandwidth can be achieved. However, please note that each tunnel incurs an additional cost on the GCP side, and using four tunnels may be excessive. To address this, the module includes the four_tunnels_redundancy option, which allows for the use of only two tunnels. In this configuration, each GCP IP is terminated to one of the tunnels of the two Site-to-Site VPNs on the OCI side. With this setup, only one tunnel from each VPN on the OCI side will be utilized, and OCI might raise concerns about the lack of high availability. However, since two VPNs are established, high availability is still achieved.`