Back
OCI Azure Interconnect Terraform

OCI–Azure Interconnect with Terraform (Part 2): FastConnect + DRG on the OCI Side

OCI Azure Interconnect Terraform – when you’ve finished the Azure side setup (Part 1), the next challenge begins on the Oracle Cloud Infrastructure side — building the FastConnect + DRG layer that makes both clouds truly talk to each other.

In this post, I’ll show you the essence of the OCI configuration, taken directly from the training module. The full implementation (including advanced routing, attachment management, and validation tests) is covered inside the OCI Azure Interconnect Terraform course.

Architecture in a Nutshell

The diagram on the right shows how the OCI Azure Interconnect Terraform deployment is structured and built step-by-step inside the course. On the OCI side, we deploy four key components — each provisioned automatically with Terraform and wired together through variables and dependency logic.

  • Dynamic Routing Gateway (DRG) – acts as the central hub for all private connectivity.
    It receives routes from multiple Virtual Circuits and redistributes them to attached VCNs.
    This makes it the main routing fabric for multicloud and hybrid connections.

  • FastConnect Virtual Circuit – establishes the private Layer 2 connection to Microsoft’s ExpressRoute.
    Each Virtual Circuit maps to a dedicated physical path between Oracle and Azure edge locations.
    BGP sessions run across this link, exchanging private network prefixes between both clouds.

  • VCN ↔ DRG Attachment – links the private subnets inside your OCI VCN to the DRG.
    Once attached, all Azure networks reachable over FastConnect become visible from within the OCI VCN’s route tables.

  • Routing and Distribution Policies – control which prefixes are imported or exported through the DRG.
    These route-distribution statements are fully automated in Terraform, but the details are covered only inside the Multicloud Advanced Networking course.

The outcome is a secure, low-latency interconnect where workloads in both clouds communicate over private IPs — with full control over routing, BGP, and failover logic.

🖼️ Figure 1. High-level topology of the OCI–Azure interconnect: ExpressRoute ↔ FastConnect ↔ DRG ↔ VCN.

Core Terraform Blocks (simplified)

Here’s a condensed version of the OCI configuration, straight from module-09-oci-azure-interconnect/oci_azure_interconnect.tf.
In the course we go step-by-step through each resource, variable, and verification command.


# --- OCI FastConnect Virtual Circuit ---
resource "oci_core_virtual_circuit" "foggykitchen_oci_fast_connect_virtual_circuit" {
  count          = (var.enable_oci_part && var.enable_oci_part_of_interconnect) ? 1 : 0
  display_name   = "foggykitchen_oci_fast_connect_virtual_circuit"
  compartment_id = oci_identity_compartment.foggykitchen_compartment[count.index].id
  gateway_id     = oci_core_drg.foggykitchen_drg1[count.index].id
  type           = "PRIVATE"

  provider_service_id       = data.oci_core_fast_connect_provider_services.fastconnects[count.index]
    .fast_connect_provider_services[
      index(data.oci_core_fast_connect_provider_services.fastconnects[count.index]
      .fast_connect_provider_services.*.provider_name, "Microsoft Azure")
    ].id
  provider_service_key_name = azurerm_express_route_circuit
    .foggykitchen_express_route_circuit[count.index].service_key

  # BGP peering IPs
  cross_connect_mappings {
    oracle_bgp_peering_ip   = "10.99.0.201/30"
    customer_bgp_peering_ip = "10.99.0.202/30"
  }

  depends_on = [azurerm_express_route_circuit.foggykitchen_express_route_circuit]
}

# --- DRG & VCN attachment ---
resource "oci_core_drg" "foggykitchen_drg1" {
  count          = (var.enable_oci_part && var.enable_oci_part_of_interconnect) ? 1 : 0
  display_name   = "foggykitchen_drg1"
  compartment_id = oci_identity_compartment.foggykitchen_compartment[count.index].id
}

resource "oci_core_drg_attachment" "foggykitchen_drg1_vcn1_attachment" {
  count      = (var.enable_oci_part && var.enable_oci_part_of_interconnect) ? 1 : 0
  drg_id     = oci_core_drg.foggykitchen_drg1[count.index].id
  vcn_id     = oci_core_vcn.foggykitchen_vcn1[count.index].id
}

👉 In the full course, you’ll also see:

  • how to build route distribution and route tables for dynamic imports,

  • how to map FastConnect attachments into the DRG fabric,

  • and how to validate BGP sessions and routes directly from both OCI and Azure.

Why this matters

Many multicloud tutorials stop at the Azure ExpressRoute setup. But the real magic happens inside OCI:

  • FastConnect allows private Layer 3 hand-off directly to Oracle’s edge.

  • The DRG provides centralized, multi-VCN routing.

  • With Terraform you can parameterize both clouds and control the entire deployment through one workflow.

Learn the Rest Inside the Course

This post gives you only the visible top of the iceberg. Inside the OCI Azure Interconnect Terraform course you’ll find:

✅ Full Terraform configuration (both sides)
✅ Step-by-step walkthroughs of FastConnect provisioning and route validation
✅ BGP troubleshooting and monitoring
✅ Architecture diagrams and recorded demos

Learn how to build and validate your OCI Azure Interconnect Terraform setup step-by-step inside the course.

OCI Azure Interconnect Terraform architecture

🚀 Master the OCI–Azure Interconnect with Terraform/OpenTofu

Build a production-ready OCI Azure Interconnect Terraform deployment step by step. Join hundreds of engineers already automating multicloud networking with FoggyKitchen.

🔒 Lifetime • ⏱️ Self-paced • 🧪 Real labs

Check also other courses:

Leave A Reply

🚀 Master the OCI–Azure Interconnect with Terraform/OpenTofu

Build a production-ready OCI Azure Interconnect Terraform deployment step by step. Join hundreds of engineers already automating multicloud networking with FoggyKitchen.

OCI Azure Interconnect Terraform architecture