The partnership between Oracle Cloud Infrastructure (OCI) and Microsoft Azure allows customers to extend their workloads from on-premises data centers across the two clouds. This blog covers two different use cases that set up interconnection using Terraform.
Setup an interconnect using existing VCN on OCI and an existing VNET on Microsoft Azure environment.
Setup an interconnect using a new VCN on OCI and a new VNET on the Microsoft Azure environment. We have also included extra configuration to support validating this effort i.e. creating required virtual machines (VMs) on both ends, subnets, policies, security groups, and so on.
We automated both use cases in the OCI GitHub repository.
Utilizing the script directly requires the following prerequisites:
An Oracle Cloud account. If you don’t have an account, you can sign up for an Oracle Cloud Free Tier account. Your user profile needs permission to manage VMs, subnets, virtual cloud networks, dynamic routing gateways, virtual circuits, and sufficient quotas.
An Azure account. If you don’t have an account, you can sign up for Microsoft Azure Free Account. Your user profile needs permission to manage VMs, subnets, virtual networks, virtual network gateways, express routes, and sufficient quotas.
The following graphic depicts a high-level topology diagram for the interconnect setup:
Figure 1: OCI and Azure interconnect setup
We’ve outlined deployment details in each use case on this GitHub repository, using the following approach:
Clone the GitHub repo locally and navigate to use case directory
Initialize Terraform locally using the command, terraform init.
Create required variables file using the provided template in each use case directory.
Log in to the Azure portal using the command, az login, from your local machine. If you don’t have Azure CLI Utility, you can install it using these instructions.
Review your plan using the command, terraform plan.
Apply your resources using the command, terraform apply.
Each use case prints required the instructions at the end of a successful attempt. If you choose to destroy your environment, you can do so using the command, terraform destroy.
The following snippet shows you a successful attempt for the use case where the end user is creating a new environment:
Apply complete! Resources: 28 added, 0 changed, 0 destroyed. Outputs: azure_server_public_ip = 40.118.XX.XX initial_instruction = 1. Open an SSH client. 2. Use the following information to connect to the instances: Azure VM Connection 1. SSH to VM using your private key and adminuser username: firstname.lastname@example.org.XX.XX OCI VM Connection: 1. SSH to VM using your private key and opc username: email@example.com.XX.XX SSH Key For example: $ ssh –i id_rsa firstname.lastname@example.org.XX.XX After you connect to each instances you can do a ping test using private IP from Each VM. oracle_server_public_ip = 150.136.XX.XX
In this section, we validate the connectivity from Azure VM to Oracle VM using interconnect circuit.
If you’re using an existing VCN and VNET, ensure that you’ve enabled the required policies and routes.
If you’re using a new VCN and VNET, the creation covers deploying those security rules and required policies. Our validation screenshots are taken from this use case.
We add a few screenshots to which you can refer to validate connectivity between the Oracle Cloud VM and Microsoft Azure VM.
The following screenshots reflect traffic validation with the following specifications:
Source: Azure VM, US East region
Destination: Oracle VM, Ashburn region
Peered connection: Washington DC
Figure 2: Microsoft Azure VM to Oracle VM connectivity
The following screenshots reflect traffic validation for the following specifications:
Source: Oracle VM, Ashburn region
Destination: Azure VM, US East region
Peered Connection: Washington DC
Figure 3: Oracle VM to Microsoft Azure Connectivity
You can achieve lower latency between Oracle Cloud and Microsoft Azure and move your workloads from on-premises to the cloud.
This post explained how you can use Terraform automation to set up an interconnect circuit between Oracle Cloud Infrastructure and Microsoft Azure. Follow these resources to learn more about interconnect, automation effort, and more: