Virtual PNI with a Foreign Port (Terraform)

DE-CIX PDM Team Updated by DE-CIX PDM Team

This article explains how to provision a VirtualPNI connection to a port owned by a different company (a foreign partner) using the DE-CIX Terraform Provider.

Requires terraform-provider-ixapi >= 1.0.3, with the DE-CIX Cloud Router extension enabled on the provider (extension_de_cix_cloud_router_enabled = true).
Please note: Currently, the partner must contact DE-CIX support to mark their connection as discoverable. Your side can then look up the product offering and connect as described below.

How it works

A Virtual PNI with a foreign port connects your port to a port owned by a different company over a point-to-point virtual circuit. Both sides attach their own port to one shared network service.

  1. The partner marks one of their connections as discoverable. This publishes a point-to-point product offering under the partner's service-provider name.
  2. Your side looks up that offering and creates a ixapi_network_service_p2p_vc, naming the partner account as the joining member.
  3. Your side attaches your port with a ixapi_network_service_config_p2p_vc; the partner attaches theirs to the same network service.

Partner side

resource "ixapi_connection" "partner" {
managing_account = var.partner_account_id
consuming_account = var.partner_account_id
billing_account = var.partner_account_id
mode = "1000BASE-LX"
product_offering = var.partner_port_offering_id
port_quantity = 1
discoverable = true
}

Your side

data "ixapi_account" "partner" {
id = var.partner_account_id
}

data "ixapi_metro_area_network" "fra" {
name = "FRA"
}

data "ixapi_product_offerings_p2p_vc" "from_partner" {
service_provider = data.ixapi_account.partner.name
handover_metro_area_network = data.ixapi_metro_area_network.fra.id
}

resource "ixapi_network_service_p2p_vc" "pni" {
managing_account = var.account_id
consuming_account = var.account_id
billing_account = var.account_id
joining_member_account = data.ixapi_account.partner.id
product_offering = data.ixapi_product_offerings_p2p_vc.from_partner.product_offerings[0].id
display_name = "virtual-pni-foreign"
}

resource "ixapi_network_service_config_p2p_vc" "mine" {
managing_account = var.account_id
consuming_account = var.account_id
billing_account = var.account_id
network_service = ixapi_network_service_p2p_vc.pni.id
network_connection = var.my_connection_id
role_assignments = []

vlan_config {
vlan_type = "dot1q"
vlan = 100
}
}

The partner creates their own ixapi_network_service_config_p2p_vc against the same network service on their discoverable connection.

The discoverable property

discoverable is an independent property of a connection that can be toggled at any time. Marking a connection as discoverable creates a new point-to-point product offering under the owner's service-provider name, making it visible to other accounts who can then connect to it.

Need help? Get in touch with our customer service.

How did we do?

End-to-End Example

Get in touch