Skip to content

randa-oci/oci-aws-ipsecvpn

Repository files navigation

OCI to AWS Site-to-Site VPN

This repository allows you to deploy a Site-to-Site VPN between OCI DRG and AWS VPN Gateway. It configures the following:

  • AWS: CGW, VPN Gateway, VPC, Subnet, Route Table, NACL and NSG
  • OCI: CPE, DRG, VCN, IGW, Subnet, Route Table and security list.
  • ICMP and SSH is enabled between AWS and OCI.
  • SSH is enabled from the administrator public IP to OCI.

https://docs.oracle.com/en-us/iaas/Content/Network/Tasks/vpn_to_aws.htm

Architecture diagram

Requirements

Steps

  • Duplicate the "terraform.tfvars.template" file and rename it to "terraform.tfvars"
  • In the new "terraform.tfvars" file complete the "OCI Tenancy Credentials", "Oracle Variables", "AWS Variables" and "VPN Variables"
  • Authenticate to AWS. For simplicity it is recommended to do it via the AWS Toolkit (requires installation)

Deployment

Create the Resources using the following commands:

terraform init
terraform plan
terraform apply

After successfully performing the "terraform apply" the administrator must connect to the AWS Portal and modify the Site-to-Site VPN selecting the New IaC CGW". This will be the last step for completing the connection.

At this point the administrator can create EC2 and compute instances in AWS and OCI portals. When creating the EC2 instance in AWS be sure to select the IaC VPC and NSG.

For destroying the deployment first modify the AWS VPN to use the "IaC_CGW" instead of the "New_IaC_CGW".

Use the following command to destroy the deployment:

terraform destroy

Acknowledgements

Releases

No releases published

Packages

No packages published

Languages