From 88ba16fcd843e596490f4fe4ee663cc5194cff31 Mon Sep 17 00:00:00 2001 From: thogarty <139183873+thogarty@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:39:53 -0800 Subject: [PATCH] Add Port Connection Module (#8) * Add port module, some completed examples, and example skeletons for non-completed examples * Add all existing examples for terraform port module. All have been tested * Add empty README.md to port module * Add organization to module variables in examples and add newline to every file --- examples/port-2-alibaba-connection/README.md | 0 examples/port-2-alibaba-connection/main.tf | 35 +++ examples/port-2-alibaba-connection/outputs.tf | 3 + .../terraform.tfvars.example | 17 ++ .../port-2-alibaba-connection/variables.tf | 73 +++++++ examples/port-2-aws-connection/README.md | 0 examples/port-2-aws-connection/main.tf | 36 ++++ examples/port-2-aws-connection/outputs.tf | 3 + .../terraform.tfvars.example | 18 ++ examples/port-2-aws-connection/variables.tf | 73 +++++++ examples/port-2-azure-connection/README.md | 0 examples/port-2-azure-connection/main.tf | 35 +++ examples/port-2-azure-connection/outputs.tf | 3 + .../terraform.tfvars.example | 17 ++ examples/port-2-azure-connection/variables.tf | 69 ++++++ .../README.md | 0 .../main.tf | 43 ++++ .../outputs.tf | 7 + .../terraform.tfvars.example | 20 ++ .../variables.tf | 85 ++++++++ examples/port-2-google-connection/README.md | 0 examples/port-2-google-connection/main.tf | 36 ++++ examples/port-2-google-connection/outputs.tf | 3 + .../terraform.tfvars.example | 18 ++ .../port-2-google-connection/variables.tf | 73 +++++++ examples/port-2-ibm1-connection/README.md | 0 examples/port-2-ibm1-connection/main.tf | 37 ++++ examples/port-2-ibm1-connection/outputs.tf | 3 + .../terraform.tfvars.example | 19 ++ examples/port-2-ibm1-connection/variables.tf | 78 +++++++ examples/port-2-ibm2-connection/README.md | 0 examples/port-2-ibm2-connection/main.tf | 37 ++++ examples/port-2-ibm2-connection/outputs.tf | 3 + .../terraform.tfvars.example | 19 ++ examples/port-2-ibm2-connection/variables.tf | 78 +++++++ examples/port-2-oracle-connection/README.md | 0 examples/port-2-oracle-connection/main.tf | 35 +++ examples/port-2-oracle-connection/outputs.tf | 3 + .../terraform.tfvars.example | 18 ++ .../port-2-oracle-connection/variables.tf | 73 +++++++ examples/port-2-port-connection/README.md | 0 examples/port-2-port-connection/main.tf | 33 +++ examples/port-2-port-connection/outputs.tf | 3 + .../terraform.tfvars.example | 15 ++ examples/port-2-port-connection/variables.tf | 65 ++++++ .../README.md | 0 .../main.tf | 33 +++ .../outputs.tf | 3 + .../terraform.tfvars.example | 15 ++ .../variables.tf | 65 ++++++ .../README.md | 0 .../main.tf | 33 +++ .../outputs.tf | 3 + .../terraform.tfvars.example | 15 ++ .../variables.tf | 65 ++++++ modules/cloud-router/README.md | 37 ---- modules/cloud-router/main.tf | 33 --- modules/cloud-router/terraform.tf | 7 - modules/cloud-router/terraform.tfvars.example | 12 -- modules/cloud-router/variables.tf | 12 -- modules/port-2-alibaba/README.md | 52 ----- modules/port-2-alibaba/main.tf | 63 ------ modules/port-2-alibaba/terraform.tf | 8 - .../port-2-alibaba/terraform.tfvars.example | 23 -- modules/port-2-alibaba/variables.tf | 23 -- modules/port-2-aws/README.md | 51 ----- modules/port-2-aws/main.tf | 63 ------ modules/port-2-aws/terraform.tf | 7 - modules/port-2-aws/terraform.tfvars.example | 21 -- modules/port-2-aws/variables.tf | 21 -- .../port-2-azure/singleConnection/README.md | 56 ----- modules/port-2-azure/singleConnection/main.tf | 61 ------ .../singleConnection/terraform.tf | 7 - .../singleConnection/terraform.tfvars.example | 19 -- .../singleConnection/variables.tf | 20 -- .../twoRedundantConnections/README.md | 58 ----- .../twoRedundantConnections/main.tf | 115 ---------- .../twoRedundantConnections/terraform.tf | 7 - .../terraform.tfvars.example | 21 -- .../twoRedundantConnections/variables.tf | 21 -- modules/port-2-google/main.tf | 62 ------ .../port-2-google/terraform.tfvars.example | 22 -- modules/port-2-google/variables.tf | 22 -- modules/port-2-ibm2/main.tf | 67 ------ modules/port-2-ibm2/terraform.tfvars.example | 21 -- modules/port-2-oracle/README.md | 51 ----- modules/port-2-oracle/main.tf | 62 ------ modules/port-2-oracle/terraform.tf | 7 - .../port-2-oracle/terraform.tfvars.example | 21 -- modules/port-2-oracle/variables.tf | 20 -- modules/port-2-port/README.md | 41 ---- modules/port-2-port/main.tf | 62 ------ modules/port-2-port/terraform.tf | 7 - modules/port-2-port/terraform.tfvars.example | 19 -- modules/port-2-port/variables.tf | 19 -- .../port-2-service-profile-private/README.md | 40 ---- .../port-2-service-profile-private/main.tf | 73 ------- .../terraform.tf | 7 - .../terraform.tfvars.example | 21 -- .../variables.tf | 21 -- .../port-2-service-profile-public/README.md | 40 ---- modules/port-2-service-profile-public/main.tf | 60 ------ .../terraform.tf | 7 - .../terraform.tfvars.example | 20 -- .../variables.tf | 20 -- modules/port-connection/README.md | 0 modules/port-connection/main.tf | 201 ++++++++++++++++++ modules/port-connection/outputs.tf | 7 + modules/port-connection/variables.tf | 127 +++++++++++ 109 files changed, 1753 insertions(+), 1630 deletions(-) create mode 100644 examples/port-2-alibaba-connection/README.md create mode 100644 examples/port-2-alibaba-connection/main.tf create mode 100644 examples/port-2-alibaba-connection/outputs.tf create mode 100644 examples/port-2-alibaba-connection/terraform.tfvars.example create mode 100644 examples/port-2-alibaba-connection/variables.tf create mode 100644 examples/port-2-aws-connection/README.md create mode 100644 examples/port-2-aws-connection/main.tf create mode 100644 examples/port-2-aws-connection/outputs.tf create mode 100644 examples/port-2-aws-connection/terraform.tfvars.example create mode 100644 examples/port-2-aws-connection/variables.tf create mode 100644 examples/port-2-azure-connection/README.md create mode 100644 examples/port-2-azure-connection/main.tf create mode 100644 examples/port-2-azure-connection/outputs.tf create mode 100644 examples/port-2-azure-connection/terraform.tfvars.example create mode 100644 examples/port-2-azure-connection/variables.tf create mode 100644 examples/port-2-azure-redundant-connections/README.md create mode 100644 examples/port-2-azure-redundant-connections/main.tf create mode 100644 examples/port-2-azure-redundant-connections/outputs.tf create mode 100644 examples/port-2-azure-redundant-connections/terraform.tfvars.example create mode 100644 examples/port-2-azure-redundant-connections/variables.tf create mode 100644 examples/port-2-google-connection/README.md create mode 100644 examples/port-2-google-connection/main.tf create mode 100644 examples/port-2-google-connection/outputs.tf create mode 100644 examples/port-2-google-connection/terraform.tfvars.example create mode 100644 examples/port-2-google-connection/variables.tf create mode 100644 examples/port-2-ibm1-connection/README.md create mode 100644 examples/port-2-ibm1-connection/main.tf create mode 100644 examples/port-2-ibm1-connection/outputs.tf create mode 100644 examples/port-2-ibm1-connection/terraform.tfvars.example create mode 100644 examples/port-2-ibm1-connection/variables.tf create mode 100644 examples/port-2-ibm2-connection/README.md create mode 100644 examples/port-2-ibm2-connection/main.tf create mode 100644 examples/port-2-ibm2-connection/outputs.tf create mode 100644 examples/port-2-ibm2-connection/terraform.tfvars.example create mode 100644 examples/port-2-ibm2-connection/variables.tf create mode 100644 examples/port-2-oracle-connection/README.md create mode 100644 examples/port-2-oracle-connection/main.tf create mode 100644 examples/port-2-oracle-connection/outputs.tf create mode 100644 examples/port-2-oracle-connection/terraform.tfvars.example create mode 100644 examples/port-2-oracle-connection/variables.tf create mode 100644 examples/port-2-port-connection/README.md create mode 100644 examples/port-2-port-connection/main.tf create mode 100644 examples/port-2-port-connection/outputs.tf create mode 100644 examples/port-2-port-connection/terraform.tfvars.example create mode 100644 examples/port-2-port-connection/variables.tf create mode 100644 examples/port-2-private-service-profile-connection/README.md create mode 100644 examples/port-2-private-service-profile-connection/main.tf create mode 100644 examples/port-2-private-service-profile-connection/outputs.tf create mode 100644 examples/port-2-private-service-profile-connection/terraform.tfvars.example create mode 100644 examples/port-2-private-service-profile-connection/variables.tf create mode 100644 examples/port-2-public-service-profile-connection/README.md create mode 100644 examples/port-2-public-service-profile-connection/main.tf create mode 100644 examples/port-2-public-service-profile-connection/outputs.tf create mode 100644 examples/port-2-public-service-profile-connection/terraform.tfvars.example create mode 100644 examples/port-2-public-service-profile-connection/variables.tf delete mode 100644 modules/cloud-router/README.md delete mode 100644 modules/cloud-router/main.tf delete mode 100644 modules/cloud-router/terraform.tf delete mode 100644 modules/cloud-router/terraform.tfvars.example delete mode 100644 modules/cloud-router/variables.tf delete mode 100644 modules/port-2-alibaba/README.md delete mode 100644 modules/port-2-alibaba/main.tf delete mode 100644 modules/port-2-alibaba/terraform.tf delete mode 100644 modules/port-2-alibaba/terraform.tfvars.example delete mode 100644 modules/port-2-alibaba/variables.tf delete mode 100644 modules/port-2-aws/README.md delete mode 100644 modules/port-2-aws/main.tf delete mode 100644 modules/port-2-aws/terraform.tf delete mode 100644 modules/port-2-aws/terraform.tfvars.example delete mode 100644 modules/port-2-aws/variables.tf delete mode 100644 modules/port-2-azure/singleConnection/README.md delete mode 100644 modules/port-2-azure/singleConnection/main.tf delete mode 100644 modules/port-2-azure/singleConnection/terraform.tf delete mode 100644 modules/port-2-azure/singleConnection/terraform.tfvars.example delete mode 100644 modules/port-2-azure/singleConnection/variables.tf delete mode 100644 modules/port-2-azure/twoRedundantConnections/README.md delete mode 100644 modules/port-2-azure/twoRedundantConnections/main.tf delete mode 100644 modules/port-2-azure/twoRedundantConnections/terraform.tf delete mode 100644 modules/port-2-azure/twoRedundantConnections/terraform.tfvars.example delete mode 100644 modules/port-2-azure/twoRedundantConnections/variables.tf delete mode 100644 modules/port-2-google/main.tf delete mode 100644 modules/port-2-google/terraform.tfvars.example delete mode 100644 modules/port-2-google/variables.tf delete mode 100644 modules/port-2-ibm2/main.tf delete mode 100644 modules/port-2-ibm2/terraform.tfvars.example delete mode 100644 modules/port-2-oracle/README.md delete mode 100644 modules/port-2-oracle/main.tf delete mode 100644 modules/port-2-oracle/terraform.tf delete mode 100644 modules/port-2-oracle/terraform.tfvars.example delete mode 100644 modules/port-2-oracle/variables.tf delete mode 100644 modules/port-2-port/README.md delete mode 100644 modules/port-2-port/main.tf delete mode 100644 modules/port-2-port/terraform.tf delete mode 100644 modules/port-2-port/terraform.tfvars.example delete mode 100644 modules/port-2-port/variables.tf delete mode 100644 modules/port-2-service-profile-private/README.md delete mode 100644 modules/port-2-service-profile-private/main.tf delete mode 100644 modules/port-2-service-profile-private/terraform.tf delete mode 100644 modules/port-2-service-profile-private/terraform.tfvars.example delete mode 100644 modules/port-2-service-profile-private/variables.tf delete mode 100644 modules/port-2-service-profile-public/README.md delete mode 100644 modules/port-2-service-profile-public/main.tf delete mode 100644 modules/port-2-service-profile-public/terraform.tf delete mode 100644 modules/port-2-service-profile-public/terraform.tfvars.example delete mode 100644 modules/port-2-service-profile-public/variables.tf create mode 100644 modules/port-connection/README.md create mode 100644 modules/port-connection/main.tf create mode 100644 modules/port-connection/outputs.tf create mode 100644 modules/port-connection/variables.tf diff --git a/examples/port-2-alibaba-connection/README.md b/examples/port-2-alibaba-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-alibaba-connection/main.tf b/examples/port-2-alibaba-connection/main.tf new file mode 100644 index 00000000..073b0e7d --- /dev/null +++ b/examples/port-2-alibaba-connection/main.tf @@ -0,0 +1,35 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_alibaba_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_seller_region = var.zside_seller_region + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-alibaba-connection/outputs.tf b/examples/port-2-alibaba-connection/outputs.tf new file mode 100644 index 00000000..99625f42 --- /dev/null +++ b/examples/port-2-alibaba-connection/outputs.tf @@ -0,0 +1,3 @@ +output "alibaba_connection_id" { + value = module.create_port_2_alibaba_connection.primary_connection_id +} diff --git a/examples/port-2-alibaba-connection/terraform.tfvars.example b/examples/port-2-alibaba-connection/terraform.tfvars.example new file mode 100644 index 00000000..3b43ece5 --- /dev/null +++ b/examples/port-2-alibaba-connection/terraform.tfvars.example @@ -0,0 +1,17 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port_2_alibaba" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "sit-tb1-dc-e5.tlab,10GSMF,A,001,201257, 21951980" +aside_vlan_tag = "2019" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SY" +zside_sp_name = "Alibaba Cloud Express Connect" +zside_seller_region = "ap-southeast-2" diff --git a/examples/port-2-alibaba-connection/variables.tf b/examples/port-2-alibaba-connection/variables.tf new file mode 100644 index 00000000..2ea84172 --- /dev/null +++ b/examples/port-2-alibaba-connection/variables.tf @@ -0,0 +1,73 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string +} diff --git a/examples/port-2-aws-connection/README.md b/examples/port-2-aws-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-aws-connection/main.tf b/examples/port-2-aws-connection/main.tf new file mode 100644 index 00000000..6668fedb --- /dev/null +++ b/examples/port-2-aws-connection/main.tf @@ -0,0 +1,36 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_aws_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + aside_vlan_inner_tag = var.aside_vlan_inner_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_seller_region = var.zside_seller_region + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-aws-connection/outputs.tf b/examples/port-2-aws-connection/outputs.tf new file mode 100644 index 00000000..648e19d7 --- /dev/null +++ b/examples/port-2-aws-connection/outputs.tf @@ -0,0 +1,3 @@ +output "aws_connection_id" { + value = module.create_port_2_aws_connection.primary_connection_id +} diff --git a/examples/port-2-aws-connection/terraform.tfvars.example b/examples/port-2-aws-connection/terraform.tfvars.example new file mode 100644 index 00000000..00ba323d --- /dev/null +++ b/examples/port-2-aws-connection/terraform.tfvars.example @@ -0,0 +1,18 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port_2_aws" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "sit-001-200009-CX-TY4-NL-Qinq-STD-10G-PRI-JP-252" +aside_vlan_tag = "2019" +aside_vlan_inner_tag = "2112" +zside_ap_type = "SP" +zside_ap_authentication_key = "357848976964" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_seller_region = "us-west-1" +zside_sp_name = "AWS Direct Connect" diff --git a/examples/port-2-aws-connection/variables.tf b/examples/port-2-aws-connection/variables.tf new file mode 100644 index 00000000..2ea84172 --- /dev/null +++ b/examples/port-2-aws-connection/variables.tf @@ -0,0 +1,73 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string +} diff --git a/examples/port-2-azure-connection/README.md b/examples/port-2-azure-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-azure-connection/main.tf b/examples/port-2-azure-connection/main.tf new file mode 100644 index 00000000..057ebb78 --- /dev/null +++ b/examples/port-2-azure-connection/main.tf @@ -0,0 +1,35 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_azure_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + aside_vlan_inner_tag = var.aside_vlan_inner_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-azure-connection/outputs.tf b/examples/port-2-azure-connection/outputs.tf new file mode 100644 index 00000000..5e9392b8 --- /dev/null +++ b/examples/port-2-azure-connection/outputs.tf @@ -0,0 +1,3 @@ +output "azure_connection_id" { + value = module.create_port_2_azure_connection.primary_connection_id +} diff --git a/examples/port-2-azure-connection/terraform.tfvars.example b/examples/port-2-azure-connection/terraform.tfvars.example new file mode 100644 index 00000000..2f474979 --- /dev/null +++ b/examples/port-2-azure-connection/terraform.tfvars.example @@ -0,0 +1,17 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port2Azure" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 100 +purchase_order_number = "1-323292" +aside_port_name = "sit-001-200009-CX-TY4-NL-Qinq-STD-10G-PRI-JP-252" +aside_vlan_tag = "2019" +aside_vlan_inner_tag = "2022" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_sp_name = "Azure ExpressRoute" diff --git a/examples/port-2-azure-connection/variables.tf b/examples/port-2-azure-connection/variables.tf new file mode 100644 index 00000000..87280b2d --- /dev/null +++ b/examples/port-2-azure-connection/variables.tf @@ -0,0 +1,69 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} diff --git a/examples/port-2-azure-redundant-connections/README.md b/examples/port-2-azure-redundant-connections/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-azure-redundant-connections/main.tf b/examples/port-2-azure-redundant-connections/main.tf new file mode 100644 index 00000000..adcff04c --- /dev/null +++ b/examples/port-2-azure-redundant-connections/main.tf @@ -0,0 +1,43 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_azure_connections" { + source = "../../modules/port-connection" + + # Primary Connection + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # Secondary Connection Overrides + secondary_connection_name = var.secondary_connection_name + secondary_bandwidth = var.secondary_bandwidth + + # Primary A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + aside_vlan_inner_tag = var.aside_vlan_inner_tag + + # Secondary A-side + aside_secondary_port_name = var.aside_secondary_port_name + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-azure-redundant-connections/outputs.tf b/examples/port-2-azure-redundant-connections/outputs.tf new file mode 100644 index 00000000..9ae6a14e --- /dev/null +++ b/examples/port-2-azure-redundant-connections/outputs.tf @@ -0,0 +1,7 @@ +output "azure_primary_connection_id" { + value = module.create_port_2_azure_connections.primary_connection_id +} + +output "azure_secondary_connection_id" { + value = module.create_port_2_azure_connections.secondary_connection_id +} diff --git a/examples/port-2-azure-redundant-connections/terraform.tfvars.example b/examples/port-2-azure-redundant-connections/terraform.tfvars.example new file mode 100644 index 00000000..a81c7a9c --- /dev/null +++ b/examples/port-2-azure-redundant-connections/terraform.tfvars.example @@ -0,0 +1,20 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port2Azure" +secondary_connection_name = "Port2Azure_2ndary" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 100 +secondary_bandwidth = 100 +purchase_order_number = "1-323292" +aside_port_name = "200001-SV1-CX-Primary-01" +aside_secondary_port_name = "200001-SV5-CX-Secondary-02" +aside_vlan_tag = "2867" +aside_vlan_inner_tag = "2098" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_sp_name = "Azure ExpressRoute" diff --git a/examples/port-2-azure-redundant-connections/variables.tf b/examples/port-2-azure-redundant-connections/variables.tf new file mode 100644 index 00000000..4d48e317 --- /dev/null +++ b/examples/port-2-azure-redundant-connections/variables.tf @@ -0,0 +1,85 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} + +variable "secondary_connection_name" { + description = "Secondary Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} + +variable "secondary_bandwidth" { + description = "Secondary Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + + +variable "aside_secondary_port_name" { + description = "Secondary Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} diff --git a/examples/port-2-google-connection/README.md b/examples/port-2-google-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-google-connection/main.tf b/examples/port-2-google-connection/main.tf new file mode 100644 index 00000000..051bd66f --- /dev/null +++ b/examples/port-2-google-connection/main.tf @@ -0,0 +1,36 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_google_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + aside_vlan_inner_tag = var.aside_vlan_inner_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_seller_region = var.zside_seller_region + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-google-connection/outputs.tf b/examples/port-2-google-connection/outputs.tf new file mode 100644 index 00000000..0855a738 --- /dev/null +++ b/examples/port-2-google-connection/outputs.tf @@ -0,0 +1,3 @@ +output "google_connection_id" { + value = module.create_port_2_google_connection.primary_connection_id +} diff --git a/examples/port-2-google-connection/terraform.tfvars.example b/examples/port-2-google-connection/terraform.tfvars.example new file mode 100644 index 00000000..4dd4a90d --- /dev/null +++ b/examples/port-2-google-connection/terraform.tfvars.example @@ -0,0 +1,18 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port_2_google" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "sit-tb1-dc-e5.tlab,10GSMF,A,001,201257, 21951980" +aside_vlan_tag = "2032" +aside_vlan_inner_tag = "2033" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_seller_region = "us-west1" +zside_sp_name = "Google Cloud Partner Interconnect Zone 2" diff --git a/examples/port-2-google-connection/variables.tf b/examples/port-2-google-connection/variables.tf new file mode 100644 index 00000000..2ea84172 --- /dev/null +++ b/examples/port-2-google-connection/variables.tf @@ -0,0 +1,73 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string +} diff --git a/examples/port-2-ibm1-connection/README.md b/examples/port-2-ibm1-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-ibm1-connection/main.tf b/examples/port-2-ibm1-connection/main.tf new file mode 100644 index 00000000..dcfffcac --- /dev/null +++ b/examples/port-2-ibm1-connection/main.tf @@ -0,0 +1,37 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_ibm1_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + aside_vlan_inner_tag = var.aside_vlan_inner_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_seller_region = var.zside_seller_region + zside_sp_name = var.zside_sp_name + primary_additional_info = var.additional_info +} diff --git a/examples/port-2-ibm1-connection/outputs.tf b/examples/port-2-ibm1-connection/outputs.tf new file mode 100644 index 00000000..55b35066 --- /dev/null +++ b/examples/port-2-ibm1-connection/outputs.tf @@ -0,0 +1,3 @@ +output "ibm1_connection_id" { + value = module.create_port_2_ibm1_connection.primary_connection_id +} diff --git a/examples/port-2-ibm1-connection/terraform.tfvars.example b/examples/port-2-ibm1-connection/terraform.tfvars.example new file mode 100644 index 00000000..6074f537 --- /dev/null +++ b/examples/port-2-ibm1-connection/terraform.tfvars.example @@ -0,0 +1,19 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixClientSecret" + +connection_name = "Port2IBM1" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "sit-tb1-dc-e5.tlab,10GSMF,A,001,201257, 21951980" +aside_vlan_tag = "3202" +aside_vlan_inner_tag = "3195" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_sp_name = "IBM Cloud Direct Link Exchange" +zside_seller_region = "San Jose 2" +additional_info = [{ key = "ASN", value = "14353" }] diff --git a/examples/port-2-ibm1-connection/variables.tf b/examples/port-2-ibm1-connection/variables.tf new file mode 100644 index 00000000..46c80916 --- /dev/null +++ b/examples/port-2-ibm1-connection/variables.tf @@ -0,0 +1,78 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string +} +variable "additional_info" { + description = "Additional info parameters. It's a list of maps containing 'key' and 'value' keys with their corresponding values." + type = list(object({ key = string, value = string })) + default = [] +} diff --git a/examples/port-2-ibm2-connection/README.md b/examples/port-2-ibm2-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-ibm2-connection/main.tf b/examples/port-2-ibm2-connection/main.tf new file mode 100644 index 00000000..b879448f --- /dev/null +++ b/examples/port-2-ibm2-connection/main.tf @@ -0,0 +1,37 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_ibm2_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + aside_vlan_inner_tag = var.aside_vlan_inner_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_seller_region = var.zside_seller_region + zside_sp_name = var.zside_sp_name + primary_additional_info = var.additional_info +} diff --git a/examples/port-2-ibm2-connection/outputs.tf b/examples/port-2-ibm2-connection/outputs.tf new file mode 100644 index 00000000..2c55e9d2 --- /dev/null +++ b/examples/port-2-ibm2-connection/outputs.tf @@ -0,0 +1,3 @@ +output "ibm2_connection_id" { + value = module.create_port_2_ibm2_connection.primary_connection_id +} diff --git a/examples/port-2-ibm2-connection/terraform.tfvars.example b/examples/port-2-ibm2-connection/terraform.tfvars.example new file mode 100644 index 00000000..a1b998b6 --- /dev/null +++ b/examples/port-2-ibm2-connection/terraform.tfvars.example @@ -0,0 +1,19 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixClientSecret" + +connection_name = "Port2IBM2" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "sit-001-200009-CX-TY4-NL-Qinq-STD-10G-PRI-JP-252" +aside_vlan_tag = "3202" +aside_vlan_inner_tag = "3195" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_sp_name = "IBM Cloud Direct Link 2" +zside_seller_region = "San Jose 2" +additional_info = [{ key = "ASN", value = "14353" }] diff --git a/examples/port-2-ibm2-connection/variables.tf b/examples/port-2-ibm2-connection/variables.tf new file mode 100644 index 00000000..46c80916 --- /dev/null +++ b/examples/port-2-ibm2-connection/variables.tf @@ -0,0 +1,78 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string +} +variable "additional_info" { + description = "Additional info parameters. It's a list of maps containing 'key' and 'value' keys with their corresponding values." + type = list(object({ key = string, value = string })) + default = [] +} diff --git a/examples/port-2-oracle-connection/README.md b/examples/port-2-oracle-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-oracle-connection/main.tf b/examples/port-2-oracle-connection/main.tf new file mode 100644 index 00000000..66cb3820 --- /dev/null +++ b/examples/port-2-oracle-connection/main.tf @@ -0,0 +1,35 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_oracle_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_authentication_key = var.zside_ap_authentication_key + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_seller_region = var.zside_seller_region + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-oracle-connection/outputs.tf b/examples/port-2-oracle-connection/outputs.tf new file mode 100644 index 00000000..17ae5bb7 --- /dev/null +++ b/examples/port-2-oracle-connection/outputs.tf @@ -0,0 +1,3 @@ +output "oracle_connection_id" { + value = module.create_port_2_oracle_connection.primary_connection_id +} diff --git a/examples/port-2-oracle-connection/terraform.tfvars.example b/examples/port-2-oracle-connection/terraform.tfvars.example new file mode 100644 index 00000000..7763b5bd --- /dev/null +++ b/examples/port-2-oracle-connection/terraform.tfvars.example @@ -0,0 +1,18 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port2Oracle" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 1000 +purchase_order_number = "1-323292" +aside_port_name = "sit-tb1-dc-e5.tlab,10GSMF,A,001,201257, 21951980" +aside_vlan_tag = "2019" +aside_vlan_inner_tag = "2020" +zside_ap_type = "SP" +zside_ap_authentication_key = "" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "DC" +zside_sp_name = "Oracle Cloud Infrastructure -OCI- FastConnect" +zside_seller_region = "us-ashburn-1" diff --git a/examples/port-2-oracle-connection/variables.tf b/examples/port-2-oracle-connection/variables.tf new file mode 100644 index 00000000..2ea84172 --- /dev/null +++ b/examples/port-2-oracle-connection/variables.tf @@ -0,0 +1,73 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string +} diff --git a/examples/port-2-port-connection/README.md b/examples/port-2-port-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-port-connection/main.tf b/examples/port-2-port-connection/main.tf new file mode 100644 index 00000000..72922d05 --- /dev/null +++ b/examples/port-2-port-connection/main.tf @@ -0,0 +1,33 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_port_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_port_name = var.zside_port_name + zside_vlan_tag = var.zside_vlan_tag + zside_location = var.zside_location +} diff --git a/examples/port-2-port-connection/outputs.tf b/examples/port-2-port-connection/outputs.tf new file mode 100644 index 00000000..6fa8c968 --- /dev/null +++ b/examples/port-2-port-connection/outputs.tf @@ -0,0 +1,3 @@ +output "port_connection_id" { + value = module.create_port_2_port_connection.primary_connection_id +} diff --git a/examples/port-2-port-connection/terraform.tfvars.example b/examples/port-2-port-connection/terraform.tfvars.example new file mode 100644 index 00000000..0ef154d9 --- /dev/null +++ b/examples/port-2-port-connection/terraform.tfvars.example @@ -0,0 +1,15 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port2Port" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com", "test1@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "ops-user100-CX-SV5-NL-Qinq-STD-1G-SEC-JP-190" +aside_vlan_tag = "1976" +zside_ap_type = "COLO" +zside_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-1G-PRI-NK-349" +zside_vlan_tag = "3711" +zside_location = "SV" diff --git a/examples/port-2-port-connection/variables.tf b/examples/port-2-port-connection/variables.tf new file mode 100644 index 00000000..defe1e86 --- /dev/null +++ b/examples/port-2-port-connection/variables.tf @@ -0,0 +1,65 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_port_name" { + description = "Equinix Port Name" + type = string +} +variable "zside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} diff --git a/examples/port-2-private-service-profile-connection/README.md b/examples/port-2-private-service-profile-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-private-service-profile-connection/main.tf b/examples/port-2-private-service-profile-connection/main.tf new file mode 100644 index 00000000..9f14a9ad --- /dev/null +++ b/examples/port-2-private-service-profile-connection/main.tf @@ -0,0 +1,33 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_private_sp_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-private-service-profile-connection/outputs.tf b/examples/port-2-private-service-profile-connection/outputs.tf new file mode 100644 index 00000000..9365dcff --- /dev/null +++ b/examples/port-2-private-service-profile-connection/outputs.tf @@ -0,0 +1,3 @@ +output "private_sp_connection_id" { + value = module.create_port_2_private_sp_connection.primary_connection_id +} diff --git a/examples/port-2-private-service-profile-connection/terraform.tfvars.example b/examples/port-2-private-service-profile-connection/terraform.tfvars.example new file mode 100644 index 00000000..1f76302f --- /dev/null +++ b/examples/port-2-private-service-profile-connection/terraform.tfvars.example @@ -0,0 +1,15 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port2PrivateSP" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "ops-user100-CX-SV5-NL-Dot1q-STD-1G-PRI-JP-170" +aside_vlan_tag = "3452" +zside_ap_type = "SP" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "DA" +zside_sp_name = "Equinix Direct Connect - Private" diff --git a/examples/port-2-private-service-profile-connection/variables.tf b/examples/port-2-private-service-profile-connection/variables.tf new file mode 100644 index 00000000..46ab9070 --- /dev/null +++ b/examples/port-2-private-service-profile-connection/variables.tf @@ -0,0 +1,65 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} diff --git a/examples/port-2-public-service-profile-connection/README.md b/examples/port-2-public-service-profile-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/port-2-public-service-profile-connection/main.tf b/examples/port-2-public-service-profile-connection/main.tf new file mode 100644 index 00000000..05f006bc --- /dev/null +++ b/examples/port-2-public-service-profile-connection/main.tf @@ -0,0 +1,33 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +module "create_port_2_public_sp_connection" { + source = "../../modules/port-connection" + + connection_name = var.connection_name + connection_type = var.connection_type + notifications_type = var.notifications_type + notifications_emails = var.notifications_emails + bandwidth = var.bandwidth + purchase_order_number = var.purchase_order_number + + # A-side + aside_port_name = var.aside_port_name + aside_vlan_tag = var.aside_vlan_tag + + # Z-side + zside_ap_type = var.zside_ap_type + zside_ap_profile_type = var.zside_ap_profile_type + zside_location = var.zside_location + zside_sp_name = var.zside_sp_name +} diff --git a/examples/port-2-public-service-profile-connection/outputs.tf b/examples/port-2-public-service-profile-connection/outputs.tf new file mode 100644 index 00000000..dfa9f5f6 --- /dev/null +++ b/examples/port-2-public-service-profile-connection/outputs.tf @@ -0,0 +1,3 @@ +output "public_sp_connection_id" { + value = module.create_port_2_public_sp_connection.primary_connection_id +} diff --git a/examples/port-2-public-service-profile-connection/terraform.tfvars.example b/examples/port-2-public-service-profile-connection/terraform.tfvars.example new file mode 100644 index 00000000..3401a337 --- /dev/null +++ b/examples/port-2-public-service-profile-connection/terraform.tfvars.example @@ -0,0 +1,15 @@ +equinix_client_id = "MyEquinixClientId" +equinix_client_secret = "MyEquinixSecret" + +connection_name = "Port2PublicSP" +connection_type = "EVPL_VC" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +bandwidth = 50 +purchase_order_number = "1-323292" +aside_port_name = "sit-001-CX-SV1-NL-Dot1q-BO-10G-PRI-JP-34" +aside_vlan_tag = "2019" +zside_ap_type = "SP" +zside_ap_profile_type = "L2_PROFILE" +zside_location = "SV" +zside_sp_name = "AMCRH-Gen-SP" diff --git a/examples/port-2-public-service-profile-connection/variables.tf b/examples/port-2-public-service-profile-connection/variables.tf new file mode 100644 index 00000000..46ab9070 --- /dev/null +++ b/examples/port-2-public-service-profile-connection/variables.tf @@ -0,0 +1,65 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string +} + +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string + +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name" + type = string +} + +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} +variable "aside_vlan_inner_tag" { + description = "Vlan Inner Tag information, inner vlanCTag for QINQ connections" + type = string + default = "" +} +variable "zside_ap_type" { + description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" + type = string +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string +} diff --git a/modules/cloud-router/README.md b/modules/cloud-router/README.md deleted file mode 100644 index e7adbbe2..00000000 --- a/modules/cloud-router/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# ECX Fabric Cloud Router CRUD operations -This example shows how to create Fabric Cloud Router. - -Note: Each time you need to create a new Fabric Cloud Router resource, -make a copy of the base folder - examples/fabric-cloud-router/ and CD into this folder to perform all the CRUD operations. - -## Define values for the Fabric Cloud Router create -At minimum, you must set below variables in `terraform.tfvars` file: - - `equinix_client_id` - Equinix client ID (consumer key), obtained after - registering app in the developer platform - - `equinix_client_secret` - Equinix client secret ID (consumer secret), - obtained same way as above - - `fcr_name` - Name of ECX Fabric Cloud Router on a-side , i.e. amcrh007-fcr - - `fcr_type` - Fabric Cloud Router type - - `fcr_location` - Fabric Cloud Router location - - `fcr_project` - Fabric Cloud Router project - - `fcr_account` - Fabric Cloud Router account - - `fcr_package` - Fabric Cloud Router package type, i.e. PRO - - `notifications_type` - notification type - - `notifications_emails` - List of emails - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. -In the given example, the folder to perform CRUD operations on an FCR resource can be found at examples/fabric-cloud-router/. - -- Change directory into - `CD examples/fabric-cloud-router/` -- Initialize Terraform plugins - `terraform init` - -## Fabric Cloud Router : Create, Read, Update and Delete(CRUD) operations - Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|---------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates an FCR resource | -| READ | `terraform show` | Reads/Shows the current state of the FCR resource | -| UPDATE | `terraform apply -refresh` | Updates the FCR resource with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created FCR resource | \ No newline at end of file diff --git a/modules/cloud-router/main.tf b/modules/cloud-router/main.tf deleted file mode 100644 index 3d99a377..00000000 --- a/modules/cloud-router/main.tf +++ /dev/null @@ -1,33 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -resource "equinix_fabric_cloud_router" "test"{ - name = var.fcr_name - type = var.fcr_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - order { - purchase_order_number= var.purchase_order_number - } - location { - metro_code=var.fcr_location - } - package { - code=var.fcr_package - } - project { - project_id = var.fcr_project - } - account { - account_number = var.fcr_account - } -} - -output "fcr_result" { - value = equinix_fabric_cloud_router.test.id -} - diff --git a/modules/cloud-router/terraform.tf b/modules/cloud-router/terraform.tf deleted file mode 100644 index fd41df1c..00000000 --- a/modules/cloud-router/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} diff --git a/modules/cloud-router/terraform.tfvars.example b/modules/cloud-router/terraform.tfvars.example deleted file mode 100644 index f1400547..00000000 --- a/modules/cloud-router/terraform.tfvars.example +++ /dev/null @@ -1,12 +0,0 @@ -equinix_client_id = "" -equinix_client_secret = "" - -fcr_name = "terra_e2e_fcr" -fcr_type = "XF_ROUTER" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com","test1@equinix.com"] -purchase_order_number = "1-323292" -fcr_location = "CH" -fcr_package = "PRO" -fcr_project = "776847000642406" -fcr_account = "203612" diff --git a/modules/cloud-router/variables.tf b/modules/cloud-router/variables.tf deleted file mode 100644 index 936036e5..00000000 --- a/modules/cloud-router/variables.tf +++ /dev/null @@ -1,12 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "fcr_name" {} -variable "fcr_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "purchase_order_number" {} -variable "fcr_location" {} -variable "fcr_package" {} -variable "fcr_project" {} -variable "fcr_account" {} diff --git a/modules/port-2-alibaba/README.md b/modules/port-2-alibaba/README.md deleted file mode 100644 index b71381aa..00000000 --- a/modules/port-2-alibaba/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# ECX Fabric Layer2 Connection to Alibaba - -This example shows how to create layer 2 connection between ECX Fabric port and Alibaba Cloud Express. -Example covers **provisioning of both sides** of the connection. - -## Adjust variables - -At minimum, you must set below variables in `terraform.tfvars` file: - -- `equinix_client_id` - Equinix client ID (consumer key), obtained after registering app in the developer platform -- `equinix_client_secret` - Equinix client secret ID (consumer secret), obtained same way as above -- `fabric_sp_name` - Service profile name like i.e. Alibaba Cloud Express Connect -- `equinix_port_name` - Name of ECX Fabric port that should be connected to Alibaba, i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-199 -- `connection_name` - the name of the connection -- `connection_type` - connection type, please refer schema -- `notifications_type` - notification type -- `notifications_emails` - List of emails -- `bandwidth` - bandwidth in MBs -- `redundancy` - Port redundancy -- `aside_ap_type` - Access point type -- `aside_port_uuid` - Port uuid, fetched based on port call using Port resource -- `aside_link_protocol_type` - link protocol type -- `aside_link_protocol_stag` - s tag number -- `aside_link_protocol_ctag` - c tag number -- `zside_ap_type` - Z side access point type -- `zside_ap_authentication_key` - Alibaba authorization key, account number like 5562571083982132 -- `zside_ap_profile_type` - Service profile type -- `zside_ap_profile_uuid` - Service profile uuid, fetched based on Service Profile get call using Service Profile search schema -- `zside_location` - Seller location -- `seller_region` - Seller region code - -## Alibaba login - -Log in to Aliaba portal use account that has permission to create -necessary resources. - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2alibaba connection can be found at examples/fabric/v4/portConnectivity/alibaba/. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/alibaba/` -- Initialize Terraform plugins - `terraform init` - -## Port to Alibaba connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|---------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2alibaba connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2alibaba connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2alibaba with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2alibaba connection resource | diff --git a/modules/port-2-alibaba/main.tf b/modules/port-2-alibaba/main.tf deleted file mode 100644 index 0a608f1a..00000000 --- a/modules/port-2-alibaba/main.tf +++ /dev/null @@ -1,63 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "alibaba" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "qinq-pri" { - filters { - name = var.equinix_port_name - } -} - -resource "equinix_fabric_connection" "alibaba-qinq" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - redundancy {priority= var.redundancy} - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type= var.aside_ap_type - port { - uuid= data.equinix_fabric_ports.qinq-pri.data.0.uuid - } - link_protocol { - type= var.aside_link_protocol_type - vlan_s_tag= var.aside_link_protocol_stag - vlan_c_tag= var.aside_link_protocol_ctag - } - } - } - z_side { - access_point { - type= var.zside_ap_type - authentication_key= var.zside_ap_authentication_key - seller_region = var.seller_region - profile { - type= var.zside_ap_profile_type - uuid= data.equinix_fabric_service_profiles.alibaba.data.0.uuid - } - location { - metro_code= var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.alibaba-qinq.id -} diff --git a/modules/port-2-alibaba/terraform.tf b/modules/port-2-alibaba/terraform.tf deleted file mode 100644 index 852cb364..00000000 --- a/modules/port-2-alibaba/terraform.tf +++ /dev/null @@ -1,8 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} - diff --git a/modules/port-2-alibaba/terraform.tfvars.example b/modules/port-2-alibaba/terraform.tfvars.example deleted file mode 100644 index 8a631695..00000000 --- a/modules/port-2-alibaba/terraform.tfvars.example +++ /dev/null @@ -1,23 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_alibaba" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_port_uuid = "c4d9350e-783c-83cd-1ce0-306a5c00a600" -aside_link_protocol_type = "QINQ" -aside_link_protocol_stag = "2019" -aside_link_protocol_ctag = "2011" -zside_ap_type = "SP" -zside_ap_authentication_key = "5562571083984786" -zside_ap_profile_type = "L2_PROFILE" -zside_ap_profile_uuid = "bfb74121-7e2c-4f74-99b3-69cdafb03b41" -zside_location = "SY" -fabric_sp_name = "Alibaba Cloud Express Connect" -equinix_port_name = "ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-199" -seller_region = "ap-southeast-2" diff --git a/modules/port-2-alibaba/variables.tf b/modules/port-2-alibaba/variables.tf deleted file mode 100644 index 01c4b47a..00000000 --- a/modules/port-2-alibaba/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_port_uuid" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_stag" {} -variable "aside_link_protocol_ctag" {} -variable "zside_ap_type" {} -variable "zside_ap_authentication_key" {} -variable "zside_ap_profile_type" {} -variable "zside_ap_profile_uuid" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "equinix_port_name" {} -variable "seller_region" {} \ No newline at end of file diff --git a/modules/port-2-aws/README.md b/modules/port-2-aws/README.md deleted file mode 100644 index 520d59dd..00000000 --- a/modules/port-2-aws/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# ECX Fabric Layer2 Connection to AWS - -This example shows how to create layer 2 connection between ECX Fabric port and AWS Cloud. -Example covers **provisioning of both sides** of the connection. - -## Adjust variables - -At minimum, you must set below variables in `terraform.tfvars` file: - -- `equinix_client_id` - Equinix client ID (consumer key), obtained after registering app in the developer platform -- `equinix_client_secret` - Equinix client secret ID (consumer secret), obtained same way as above -- `fabric_sp_name` - Service profile name like i.e. AWS -- `equinix_port_name` - Name of ECX Fabric port that should be connected to AWS, i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-199 -- `connection_name` - the name of the connection -- `connection_type` - connection type, please refer schema -- `notifications_type` - notification type -- `notifications_emails` - List of emails -- `bandwidth` - bandwidth in MBs -- `redundancy` - Port redundancy -- `aside_ap_type` - Access point type -- `aside_port_uuid` - Port uuid, fetched based on port call using Port resource -- `aside_link_protocol_type` - link protocol type -- `aside_link_protocol_stag` - s tag number -- `aside_link_protocol_ctag` - c tag number -- `zside_ap_type` - Z side access point type -- `zside_ap_authentication_key` - AWS authorization key, account number like 357848912121 -- `zside_ap_profile_type` - Service profile type -- `zside_ap_profile_uuid` - Service profile uuid, fetched based on Service Profile get call using Service Profile search schema -- `zside_location` - Seller location -- `seller_region` - Seller region code - -## AWS login - -Log in to AWS portal use account that has permission to create necessary resources. - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2aws connection can be found at examples/fabric/v4/portConnectivity/aws/. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/aws/` -- Initialize Terraform plugins - `terraform init` - -## Port to AWS connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|-----------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2aws connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2aws connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2aws with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2aws connection resource | diff --git a/modules/port-2-aws/main.tf b/modules/port-2-aws/main.tf deleted file mode 100644 index 1a6e05cc..00000000 --- a/modules/port-2-aws/main.tf +++ /dev/null @@ -1,63 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "aws" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "qinq-pri" { - filters { - name = var.equinix_port_name - } -} - -resource "equinix_fabric_connection" "aws-qinq" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - redundancy {priority= var.redundancy} - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type= var.aside_ap_type - port { - uuid= data.equinix_fabric_ports.qinq-pri.data.0.uuid - } - link_protocol { - type= var.aside_link_protocol_type - vlan_s_tag= var.aside_link_protocol_stag - vlan_c_tag = var.aside_link_protocol_ctag - } - } - } - z_side { - access_point { - type= var.zside_ap_type - authentication_key= var.zside_ap_authentication_key - seller_region = var.seller_region - profile { - type= var.zside_ap_profile_type - uuid= data.equinix_fabric_service_profiles.aws.data.0.uuid - } - location { - metro_code= var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.aws-qinq.id -} diff --git a/modules/port-2-aws/terraform.tf b/modules/port-2-aws/terraform.tf deleted file mode 100644 index fd41df1c..00000000 --- a/modules/port-2-aws/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} diff --git a/modules/port-2-aws/terraform.tfvars.example b/modules/port-2-aws/terraform.tfvars.example deleted file mode 100644 index 8be31a6b..00000000 --- a/modules/port-2-aws/terraform.tfvars.example +++ /dev/null @@ -1,21 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_aws" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "QINQ" -aside_link_protocol_stag = "2019" -aside_link_protocol_ctag = "2112" -zside_ap_type = "SP" -zside_ap_authentication_key = "357848976964" -zside_ap_profile_type = "L2_PROFILE" -zside_location = "SV" -seller_region = "us-west-1" -fabric_sp_name = "AWS Direct Connect" -equinix_port_name = "ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-199" diff --git a/modules/port-2-aws/variables.tf b/modules/port-2-aws/variables.tf deleted file mode 100644 index ac344005..00000000 --- a/modules/port-2-aws/variables.tf +++ /dev/null @@ -1,21 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_stag" {} -variable "aside_link_protocol_ctag" {} -variable "zside_ap_type" {} -variable "zside_ap_authentication_key" {} -variable "zside_ap_profile_type" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "equinix_port_name" {} -variable "seller_region" {} \ No newline at end of file diff --git a/modules/port-2-azure/singleConnection/README.md b/modules/port-2-azure/singleConnection/README.md deleted file mode 100644 index 10656fb8..00000000 --- a/modules/port-2-azure/singleConnection/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# ECX Fabric Layer2 Connection to Azure - -This example shows how to create layer 2 connection between ECX Fabric port -and AZURE Cloud. - -## Adjust variables - -At minimum, you must set below variables in `terraform.tfvars` file: - - -* `equinix_client_id` - Equinix client ID (consumer key), obtained after - registering app in the developer platform -* `equinix_client_secret` - Equinix client secret ID (consumer secret), - obtained same way as above - -`connection_name` - The name of the connection -`connection_type` - Connection type, please refer to OAS schema for enum values. -`notifications_type` - Notification type -`notifications_emails` - List of emails -`bandwidth` - Bandwidth in MBs -`redundancy` - Port redundancy PRIMARY or SECONDARY -`purchase_order_number` - Purchase order number applied to billing invoices for this connection. -`aside_ap_type` - Access point type -`aside_link_protocol_type` - Link protocol type -`aside_link_protocol_stag` - S-Tag number -`zside_ap_type` - Z side access point type -`zside_ap_authentication_key` - AZURE authorization key, like c620477c-3f30-41e8-a0b9-cf324a12121d -`zside_ap_profile_type` - Service profile type -`zside_location` - Equinix Metro Code for the Z side access point -`fabric_sp_name` - Service profile name like i.e. AZURE -`equinix_port_name` - Name of ECX Fabric port that will be used for the Connection - -## Azure login - -Log in to Azure portal with an account that has permission to create necessary resources. - -Create an Azure ExpressRoute Circuit and use its Service Key as the Authentication Key in the examples. - -Bandwidth in Terraform must match the bandwidth of the ExpressRoute Circuit created in Azure. - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2azure connection can be found at examples/fabric/v4/portConnectivity/azure/singleConnection. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/azure/singleConnection` -- Initialize Terraform plugins - `terraform init` - -## Port to Azure connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|-------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2azure connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2azure connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2azure with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2azure connection resource | diff --git a/modules/port-2-azure/singleConnection/main.tf b/modules/port-2-azure/singleConnection/main.tf deleted file mode 100644 index 48c3439d..00000000 --- a/modules/port-2-azure/singleConnection/main.tf +++ /dev/null @@ -1,61 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "azure" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "qinq-pri" { - filters { - name = var.equinix_port_name - } -} - -resource "equinix_fabric_connection" "azure-qinq" { - name = var.connection_name - type = var.connection_type - notifications { - type = var.notifications_type - emails = var.notifications_emails - } - bandwidth = var.bandwidth - redundancy { priority = var.redundancy } - order { - purchase_order_number = var.purchase_order_number - } - a_side { - access_point { - type = var.aside_ap_type - port { - uuid = data.equinix_fabric_ports.qinq-pri.data.0.uuid - } - link_protocol { - type = var.aside_link_protocol_type - vlan_s_tag = var.aside_link_protocol_stag - } - } - } - z_side { - access_point { - type = var.zside_ap_type - authentication_key = var.zside_ap_authentication_key - profile { - type = var.zside_ap_profile_type - uuid = data.equinix_fabric_service_profiles.azure.data.0.uuid - } - location { - metro_code = var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.azure-qinq.id -} diff --git a/modules/port-2-azure/singleConnection/terraform.tf b/modules/port-2-azure/singleConnection/terraform.tf deleted file mode 100644 index 2dc81d8b..00000000 --- a/modules/port-2-azure/singleConnection/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} \ No newline at end of file diff --git a/modules/port-2-azure/singleConnection/terraform.tfvars.example b/modules/port-2-azure/singleConnection/terraform.tfvars.example deleted file mode 100644 index 3d3d8e5e..00000000 --- a/modules/port-2-azure/singleConnection/terraform.tfvars.example +++ /dev/null @@ -1,19 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "Terra_Port2Azure" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "QINQ" -aside_link_protocol_stag = "2019" -zside_ap_type = "SP" -zside_ap_authentication_key = "Azure Express Route Service Key" -zside_ap_profile_type = "L2_PROFILE" -zside_location = "SV" -fabric_sp_name = "Azure ExpressRoute" -equinix_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-1G-PRI-NK-349" diff --git a/modules/port-2-azure/singleConnection/variables.tf b/modules/port-2-azure/singleConnection/variables.tf deleted file mode 100644 index eb6680d7..00000000 --- a/modules/port-2-azure/singleConnection/variables.tf +++ /dev/null @@ -1,20 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_stag" {} -variable "zside_ap_type" {} -variable "zside_ap_authentication_key" {} -variable "peering_type" {} -variable "zside_ap_profile_type" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "equinix_port_name" {} diff --git a/modules/port-2-azure/twoRedundantConnections/README.md b/modules/port-2-azure/twoRedundantConnections/README.md deleted file mode 100644 index 9cecf2c2..00000000 --- a/modules/port-2-azure/twoRedundantConnections/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# ECX Fabric Layer2 Redundant Connection to Azure - -This example shows how to create Layer 2 Connection between two ECX Fabric ports -and AZURE Cloud. - -## Adjust variables - -At minimum, you must set below variables in `terraform.tfvars` file: - -* `equinix_client_id` - Equinix client ID (consumer key), obtained after - registering app in the developer platform -* `equinix_client_secret` - Equinix client secret ID (consumer secret), - obtained same way as above - -`pri_connection_name` - The name of the PRIMARY connection -`sec_connection_name` - The name of the SECONDARY connection -`connection_type` - Connection type, please refer to OAS schema for enum values. -`notifications_type` - Notification type -`notifications_emails` - List of emails -`bandwidth` - Bandwidth in MBs -`purchase_order_number` - Purchase order number applied to billing invoices for this connection. -`aside_ap_type` - Access point type -`aside_link_protocol_type` - Link protocol type -`aside_pri_link_protocol_stag` - S-Tag number for PRIMARY Connection -`aside_sec_link_protocol_stag` - S-Tag number for SECONDARY Connection -`zside_ap_type` - Z side access point type -`zside_ap_authentication_key` - AZURE authorization key, like c620477c-3f30-41e8-a0b9-cf324a12121d -`zside_ap_profile_type` - Service profile type -`zside_location` - Equinix Metro Code for the Z side access point -`fabric_sp_name` - Service profile name like i.e. AZURE -`equinix_pri_port_name` - Name of ECX Fabric Port for the PRIMARY Connection -`equinix_sec_port_name` - Name of ECX Fabric Port for the SECONDARY Connection - -## Azure login - -Log in to Azure portal with an account that has permission to create necessary resources. - -Create an Azure ExpressRoute Circuit and use its Service Key as the Authentication Key in the examples. - -Bandwidth in Terraform must match the bandwidth of the ExpressRoute Circuit created in Azure. - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2azure redundant connections can be found at examples/fabric/v4/portConnectivity/azure/twoRedundantConnections. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/azure/twoRedundantConnections` -- Initialize Terraform plugins - `terraform init` - -## Port to Azure connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|--------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2azure redundant connection resources | -| READ | `terraform show` | Reads/Shows the current state of the port2azure connection resources | -| UPDATE | `terraform apply -refresh` | Updates the connections with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2azure connection resources | - diff --git a/modules/port-2-azure/twoRedundantConnections/main.tf b/modules/port-2-azure/twoRedundantConnections/main.tf deleted file mode 100644 index d1959c05..00000000 --- a/modules/port-2-azure/twoRedundantConnections/main.tf +++ /dev/null @@ -1,115 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "azure" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "qinq-pri" { - filters { - name = var.equinix_pri_port_name - } -} - -data "equinix_fabric_ports" "qinq-sec" { - filters { - name = var.equinix_sec_port_name - } -} - -resource "equinix_fabric_connection" "azure-qinq" { - name = var.pri_connection_name - type = var.connection_type - notifications { - type = var.notifications_type - emails = var.notifications_emails - } - bandwidth = var.bandwidth - redundancy { - priority = "PRIMARY" - } - order { - purchase_order_number = var.purchase_order_number - } - a_side { - access_point { - type = var.aside_ap_type - port { - uuid = data.equinix_fabric_ports.qinq-pri.data.0.uuid - } - link_protocol { - type = var.aside_link_protocol_type - vlan_s_tag = var.aside_pri_link_protocol_stag - } - } - } - z_side { - access_point { - type = var.zside_ap_type - authentication_key = var.zside_ap_authentication_key - profile { - type = var.zside_ap_profile_type - uuid = data.equinix_fabric_service_profiles.azure.data.0.uuid - } - location { - metro_code = var.zside_location - } - } - } -} - -resource "equinix_fabric_connection" "azure-qinq-second-connection" { - name = var.sec_connection_name - type = var.connection_type - notifications { - type = var.notifications_type - emails = var.notifications_emails - } - bandwidth = var.bandwidth - redundancy { - priority = "SECONDARY" - group = one(equinix_fabric_connection.azure-qinq.redundancy).group - } - order { - purchase_order_number = var.purchase_order_number - } - a_side { - access_point { - type = var.aside_ap_type - port { - uuid = data.equinix_fabric_ports.qinq-sec.data.0.uuid - } - link_protocol { - type = var.aside_link_protocol_type - vlan_s_tag = var.aside_sec_link_protocol_stag - } - } - } - z_side { - access_point { - type = var.zside_ap_type - authentication_key = var.zside_ap_authentication_key - profile { - type = var.zside_ap_profile_type - uuid = data.equinix_fabric_service_profiles.azure.data.0.uuid - } - location { - metro_code = var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.azure-qinq.id -} - -output "second_connection_result" { - value = equinix_fabric_connection.azure-qinq-second-connection.id -} diff --git a/modules/port-2-azure/twoRedundantConnections/terraform.tf b/modules/port-2-azure/twoRedundantConnections/terraform.tf deleted file mode 100644 index fd41df1c..00000000 --- a/modules/port-2-azure/twoRedundantConnections/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} diff --git a/modules/port-2-azure/twoRedundantConnections/terraform.tfvars.example b/modules/port-2-azure/twoRedundantConnections/terraform.tfvars.example deleted file mode 100644 index 7c2e6b9c..00000000 --- a/modules/port-2-azure/twoRedundantConnections/terraform.tfvars.example +++ /dev/null @@ -1,21 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -pri_connection_name = "Terra_Port2Azure_Pri" -sec_connection_name = "Terra_Port2Azure_Sec" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "QINQ" -aside_pri_link_protocol_stag = "2019" -aside_sec_link_protocol_stag = "2020" -zside_ap_type = "SP" -zside_ap_authentication_key = "Azure Express Route Service Key" -zside_ap_profile_type = "L2_PROFILE" -zside_location = "SV" -fabric_sp_name = "Azure ExpressRoute" -equinix_pri_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-10G-PRI-JP-149" -equinix_sec_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-10G-PRI-JP-150" diff --git a/modules/port-2-azure/twoRedundantConnections/variables.tf b/modules/port-2-azure/twoRedundantConnections/variables.tf deleted file mode 100644 index 4dec9bf6..00000000 --- a/modules/port-2-azure/twoRedundantConnections/variables.tf +++ /dev/null @@ -1,21 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "pri_connection_name" {} -variable "sec_connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_link_protocol_type" {} -variable "aside_pri_link_protocol_stag" {} -variable "aside_sec_link_protocol_stag" {} -variable "zside_ap_type" {} -variable "zside_ap_authentication_key" {} -variable "zside_ap_profile_type" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "equinix_pri_port_name" {} -variable "equinix_sec_port_name" {} diff --git a/modules/port-2-google/main.tf b/modules/port-2-google/main.tf deleted file mode 100644 index b738fb24..00000000 --- a/modules/port-2-google/main.tf +++ /dev/null @@ -1,62 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "gcp" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "gcp-pri" { - filters { - name = var.primary_port_name - } -} - -resource "equinix_fabric_connection" "gcp-qinq" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - redundancy {priority= var.redundancy} - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type = var.aside_ap_type - port { - uuid = data.equinix_fabric_ports.gcp-pri.data.0.uuid - } - link_protocol { - type = var.aside_link_protocol_type - vlan_tag = var.aside_link_protocol_stag - } - } - } - z_side { - access_point { - type = var.zside_ap_type - authentication_key = var.zside_ap_authentication_key - seller_region = var.zside_seller_region - profile { - type = var.zside_ap_profile_type - uuid = data.equinix_fabric_service_profiles.gcp.data.0.uuid - } - location { - metro_code = var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.gcp-qinq.id -} diff --git a/modules/port-2-google/terraform.tfvars.example b/modules/port-2-google/terraform.tfvars.example deleted file mode 100644 index 3662a1cd..00000000 --- a/modules/port-2-google/terraform.tfvars.example +++ /dev/null @@ -1,22 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_google" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_port_uuid = "c4d9350e-783c-83cd-1ce0-306a5c00a600" -aside_link_protocol_type = "DOT1Q" -aside_link_protocol_stag = "2019" -zside_ap_type = "SP" -zside_ap_authentication_key = "9da09fe8-a33b-4457-ab7d-d91f83152276/us-west1/1" -zside_ap_profile_type = "L2_PROFILE" -zside_ap_profile_uuid = "e7488e45-c0b0-4c45-bdd9-d70c580dd9fd" -zside_location = "SV" -zside_seller_region="us-west1" -fabric_sp_name = "Google Cloud Partner Interconnect Zone 1" -primary_port_name = "ops-user100-CX-DC5-NL-Dot1q-BO-10G-PRI-JP-90" diff --git a/modules/port-2-google/variables.tf b/modules/port-2-google/variables.tf deleted file mode 100644 index e20ca018..00000000 --- a/modules/port-2-google/variables.tf +++ /dev/null @@ -1,22 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_port_uuid" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_stag" {} -variable "zside_ap_type" {} -variable "zside_ap_authentication_key" {} -variable "zside_ap_profile_type" {} -variable "zside_ap_profile_uuid" {} -variable "zside_location" {} -variable "zside_seller_region" {} -variable "fabric_sp_name" {} -variable "primary_port_name" {} \ No newline at end of file diff --git a/modules/port-2-ibm2/main.tf b/modules/port-2-ibm2/main.tf deleted file mode 100644 index f55849e0..00000000 --- a/modules/port-2-ibm2/main.tf +++ /dev/null @@ -1,67 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "ibm" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "port" { - filters { - name = var.equinix_port_name - } -} - -resource "equinix_fabric_connection" "ibm2" { - name = var.connection_name - type = var.connection_type - - notifications { - type = var.notifications_type - emails = var.notifications_emails - } - - bandwidth = var.bandwidth - - additional_info = [{key = "ASN", value = var.seller_asn }, {"key"= "Global","value" = "false"}, {"key" = "BGP_IBM_CIDR","value" = "172.16.0.18/30"},{"key" = "BGP_CER_CIDR","value" = "172.16.0.19/30"} ] - - redundancy { priority = var.redundancy } - order { - purchase_order_number = var.purchase_order_number - } - a_side { - access_point { - type = var.aside_ap_type - port { - uuid = data.equinix_fabric_ports.port.id - } - link_protocol { - type = var.aside_link_protocol_type - vlan_tag = var.aside_link_protocol_tag - } - } - } - z_side { - access_point { - type = var.zside_ap_type - authentication_key = var.zside_ap_authentication_key - seller_region = var.seller_region - profile { - type = var.zside_ap_profile_type - uuid = data.equinix_fabric_service_profiles.ibm.id - } - location { - metro_code = var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.ibm2.id -} diff --git a/modules/port-2-ibm2/terraform.tfvars.example b/modules/port-2-ibm2/terraform.tfvars.example deleted file mode 100644 index 5c5816f6..00000000 --- a/modules/port-2-ibm2/terraform.tfvars.example +++ /dev/null @@ -1,21 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixClientSecret" - -connection_name = "Terra_Port2IBM2" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "DOT1Q" -aside_link_protocol_tag = "1302" -zside_ap_type = "SP" -zside_ap_authentication_key = "IBM Authentication Key" -zside_ap_profile_type = "L2_PROFILE" -zside_location = "SV" -fabric_sp_name = "IBM Cloud Direct Link 2" -equinix_port_name = "Equinix Port Name" -seller_asn = "2400" -seller_region = "San Jose 2" diff --git a/modules/port-2-oracle/README.md b/modules/port-2-oracle/README.md deleted file mode 100644 index db7f2e88..00000000 --- a/modules/port-2-oracle/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# ECX Fabric Layer2 Connection to Oracle - -This example shows how to create layer 2 connection between ECX Fabric port -and Oracle Cloud. -Example covers **provisioning of both sides** of the connection. - -## Adjust variables - -At minimum, you must set below variables in `terraform.tfvars` file: - -- `equinix_client_id` - Equinix client ID (consumer key), obtained after registering app in the developer platform -- `equinix_client_secret` - Equinix client secret ID (consumer secret), obtained same way as above -- `fabric_sp_name` - Service profile name like i.e. **Oracle Cloud Infrastructure -OCI- FastConnect** -- `equinix_port_name` - Name of ECX Fabric port that should be connected to Oracle, i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-000 -- `connection_name` - the name of the connection -- `connection_type` - connection type, please refer schema -- `notifications_type` - notification type -- `notifications_emails` - List of emails -- `bandwidth` - bandwidth in MBs -- `redundancy` - Port redundancy -- `aside_ap_type` - Access point type -- `aside_port_uuid` - Port uuid, fetched based on port call using Port resource -- `aside_link_protocol_type` - link protocol type -- `aside_link_protocol_tag` - tag number -- `zside_ap_type` - Z side access point type -- `zside_ap_authentication_key` - Oracle authorization key following a pattern, like **ocid1.virtualcircuit.oc1.phx.aaaaaaaa62hgxtczqwpaour5gnaq4qn2wupjwpqtsknr2mvxblrcdtusda1a** -- `zside_ap_profile_type` - Service profile type -- `zside_ap_profile_uuid` - Service profile uuid, fetched based on Service Profile get call using Service Profile search schema -- `zside_location` - Seller location -- `seller_region` - Seller region code - -## Oracle login - -Log in to Oracle portal use account that has permission to create necessary resources. - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2oracle connection can be found at examples/fabric/v4/portConnectivity/oracle/. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/oracle/` -- Initialize Terraform plugins - `terraform init` - -## Port to Oracle connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|--------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2oracle connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2oracle connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2oracle with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2oracle connection resource | \ No newline at end of file diff --git a/modules/port-2-oracle/main.tf b/modules/port-2-oracle/main.tf deleted file mode 100644 index 1486f845..00000000 --- a/modules/port-2-oracle/main.tf +++ /dev/null @@ -1,62 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "oracle" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "qinq-pri" { - filters { - name = var.equinix_port_name - } -} - -resource "equinix_fabric_connection" "oracle-qinq" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - redundancy {priority= var.redundancy} - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type= var.aside_ap_type - port { - uuid= data.equinix_fabric_ports.qinq-pri.data.0.uuid - } - link_protocol { - type= var.aside_link_protocol_type - vlan_tag= var.aside_link_protocol_tag - } - } - } - z_side { - access_point { - type= var.zside_ap_type - authentication_key= var.zside_ap_authentication_key - seller_region=var.seller_region - profile { - type= var.zside_ap_profile_type - uuid= data.equinix_fabric_service_profiles.oracle.data.0.uuid - } - location { - metro_code= var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.oracle-qinq.id -} diff --git a/modules/port-2-oracle/terraform.tf b/modules/port-2-oracle/terraform.tf deleted file mode 100644 index 2dc81d8b..00000000 --- a/modules/port-2-oracle/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} \ No newline at end of file diff --git a/modules/port-2-oracle/terraform.tfvars.example b/modules/port-2-oracle/terraform.tfvars.example deleted file mode 100644 index 677a4971..00000000 --- a/modules/port-2-oracle/terraform.tfvars.example +++ /dev/null @@ -1,21 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_oracle" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "DOT1Q" -aside_link_protocol_tag = "2019" -zside_ap_type = "SP" -zside_ap_authentication_key = "ocid1.virtualcircuit.oc1.phx.aaaaaaaa62hgxtczqwpaour5gnaq4qn2wupjwpqtsknr2mvxblrcdtuyda2q" -zside_ap_profile_type = "L2_PROFILE" -zside_location = "DC" -fabric_sp_name = "Oracle Cloud Infrastructure -OCI- FastConnect" -equinix_port_name = "ops-user100-CX-SV5-NL-Dot1q-STD-1G-PRI-JP-170" -seller_region = "us-ashburn-1" - diff --git a/modules/port-2-oracle/variables.tf b/modules/port-2-oracle/variables.tf deleted file mode 100644 index b31226b1..00000000 --- a/modules/port-2-oracle/variables.tf +++ /dev/null @@ -1,20 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_tag" {} -variable "zside_ap_type" {} -variable "zside_ap_authentication_key" {} -variable "zside_ap_profile_type" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "equinix_port_name" {} -variable "seller_region" {} \ No newline at end of file diff --git a/modules/port-2-port/README.md b/modules/port-2-port/README.md deleted file mode 100644 index bb632f35..00000000 --- a/modules/port-2-port/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# ECX Fabric Layer2 Connection between two own ports - -This example shows how create layer 2 connection between two, own ECX Fabric ports. - -## Adjust variables -At minimum, you must set below variables in `terraform.tfvars` file: - -- `equinix_client_id` - Equinix client ID (consumer key), obtained after registering app in the developer platform -- `equinix_client_secret` - Equinix client secret ID (consumer secret), obtained same way as above -- `aside_port_name` - Name of ECX Fabric a-side port i.e. ops-user100-CX-SV5-NL-Qinq-STD-1G-SEC-JP-111 -- `zside_port_name` - Name of ECX Fabric z-side port , i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-000 -- `connection_name` - the name of the connection -- `connection_type` - connection type, please refer schema -- `notifications_type` - notification type -- `notifications_emails` - List of emails -- `bandwidth` - bandwidth in MBs -- `redundancy` - Port redundancy -- `aside_ap_type` - Access point type -- `aside_port_uuid` - Port uuid, fetched based on port call using Port resource -- `aside_link_protocol_type` - link protocol type -- `aside_link_protocol_stag` - a-side s tag number -- `zside_ap_type` - Z side access point type -- `aside_link_protocol_stag` - z-side s tag number -- `zside_location` - Seller location - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2portself connection can be found at examples/fabric/v4/portConnectivity/port2portself/. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/port2portself/` -- Initialize Terraform plugins - `terraform init` - -## Port to Port2Portself connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|----------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2portself connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2portself connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2portself with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2portself connection resource | \ No newline at end of file diff --git a/modules/port-2-port/main.tf b/modules/port-2-port/main.tf deleted file mode 100644 index 1dca8490..00000000 --- a/modules/port-2-port/main.tf +++ /dev/null @@ -1,62 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_ports" "aside" { - filters { - name = var.aside_port_name - } -} - -data "equinix_fabric_ports" "zside" { - filters { - name = var.zside_port_name - } -} -resource "equinix_fabric_connection" "p2p-qinq" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type= var.aside_ap_type - port { - uuid= data.equinix_fabric_ports.aside.data.0.uuid - } - link_protocol { - type= var.aside_link_protocol_type - vlan_s_tag= var.aside_link_protocol_stag - } - gateway { - uuid= "XF_ROUTER" - } - } - } - z_side { - access_point { - type= var.zside_ap_type - port { - uuid= data.equinix_fabric_ports.zside.data.0.uuid - } - link_protocol { - type= var.zside_link_protocol_type - vlan_s_tag= var.zside_link_protocol_stag - } - location { - metro_code= var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.p2p-qinq.id -} diff --git a/modules/port-2-port/terraform.tf b/modules/port-2-port/terraform.tf deleted file mode 100644 index 2dc81d8b..00000000 --- a/modules/port-2-port/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} \ No newline at end of file diff --git a/modules/port-2-port/terraform.tfvars.example b/modules/port-2-port/terraform.tfvars.example deleted file mode 100644 index 1a7c74a5..00000000 --- a/modules/port-2-port/terraform.tfvars.example +++ /dev/null @@ -1,19 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_p2p" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com","test1@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "QINQ" -aside_link_protocol_stag = "1976" -zside_ap_type = "COLO" -zside_link_protocol_type = "QINQ" -zside_link_protocol_stag = "3711" -zside_location = "SV" -aside_port_name = "ops-user100-CX-SV5-NL-Qinq-STD-1G-SEC-JP-190" -zside_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-1G-PRI-NK-349" \ No newline at end of file diff --git a/modules/port-2-port/variables.tf b/modules/port-2-port/variables.tf deleted file mode 100644 index 31530a9c..00000000 --- a/modules/port-2-port/variables.tf +++ /dev/null @@ -1,19 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_stag" {} -variable "zside_ap_type" {} -variable "zside_link_protocol_type" {} -variable "zside_link_protocol_stag" {} -variable "zside_location" {} -variable "aside_port_name" {} -variable "zside_port_name" {} \ No newline at end of file diff --git a/modules/port-2-service-profile-private/README.md b/modules/port-2-service-profile-private/README.md deleted file mode 100644 index 31620f48..00000000 --- a/modules/port-2-service-profile-private/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# ECX Fabric Layer2 private seller profile - -This example shows how to create layer2 between ECX Fabric Port and Private Seller Profile. - -## Adjust variables -- `equinix_client_id` - Equinix client ID (consumer key), obtained after registering app in the developer platform -- `equinix_client_secret` - Equinix client secret ID (consumer secret), obtained same way as above -- `fabric_sp_name` - Service profile name like i.e. **Equinix Direct Connect - Private** -- `aside_port_name` - Name of ECX Fabric port that should be connected used for the connection, i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-000 -- `connection_name` - the name of the connection -- `connection_type` - connection type, please refer schema -- `notifications_type` - notification type -- `notifications_emails` - List of emails -- `bandwidth` - bandwidth in MBs -- `redundancy` - Port redundancy -- `aside_ap_type` - Access point type -- `aside_port_uuid` - Port uuid, fetched based on port call using Port resource -- `aside_link_protocol_type` - link protocol type -- `aside_link_protocol_tag` - tag number -- `zside_ap_type` - Z side access point type -- `zside_ap_profile_type` - Service profile type -- `zside_ap_profile_uuid` - Service profile uuid, fetched based on Service Profile get call using Service Profile search schema -- `zside_location` - Seller location - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2serviceprofileprivate connection can be found at examples/fabric/v4/portConnectivity/port2serviceprofileprivate/. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/port2serviceprofileprivate/` -- Initialize Terraform plugins - `terraform init` - -## Port to Service Profile Private connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|-----------------------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2serviceprofileprivate connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2serviceprofileprivate connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2serviceprofileprivate with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2serviceprofileprivate connection resource | \ No newline at end of file diff --git a/modules/port-2-service-profile-private/main.tf b/modules/port-2-service-profile-private/main.tf deleted file mode 100644 index 3a92b4a5..00000000 --- a/modules/port-2-service-profile-private/main.tf +++ /dev/null @@ -1,73 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "spprivate" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "aside" { - filters { - name = var.equinix_aside_port_name - } -} - -data "equinix_fabric_ports" "zside" { - filters { - name = var.equinix_zside_port_name - } -} - -resource "equinix_fabric_connection" "sp-private-qinq" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - redundancy {priority= var.redundancy} - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type= var.aside_ap_type - port { - uuid= data.equinix_fabric_ports.aside.data.0.uuid - } - link_protocol { - type= var.aside_link_protocol_type - vlan_tag= var.aside_link_protocol_tag - } - } - } - z_side { - access_point { - type= var.zside_ap_type - port { - uuid= data.equinix_fabric_ports.zside.data.0.uuid - } - profile { - type= var.zside_ap_profile_type - uuid= data.equinix_fabric_service_profiles.spprivate.data.0.uuid - } - link_protocol { - type= var.zside_link_protocol_type - vlan_tag= var.zside_link_protocol_tag - } - location { - metro_code= var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.sp-private-qinq.id -} diff --git a/modules/port-2-service-profile-private/terraform.tf b/modules/port-2-service-profile-private/terraform.tf deleted file mode 100644 index 2dc81d8b..00000000 --- a/modules/port-2-service-profile-private/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} \ No newline at end of file diff --git a/modules/port-2-service-profile-private/terraform.tfvars.example b/modules/port-2-service-profile-private/terraform.tfvars.example deleted file mode 100644 index 43714a1c..00000000 --- a/modules/port-2-service-profile-private/terraform.tfvars.example +++ /dev/null @@ -1,21 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_spprivate" -connection_type = "EVPL_VC" -notifications_type = "ALL" -redundancy = "PRIMARY" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_link_protocol_type = "DOT1Q" -aside_link_protocol_tag = "2019" -zside_ap_type = "SP" -zside_link_protocol_type = "DOT1Q" -zside_link_protocol_tag = "1457" -zside_ap_profile_type = "L2_PROFILE" -zside_location = "DA" -fabric_sp_name = "Equinix Direct Connect - Private" -equinix_aside_port_name = "ops-user100-CX-SV5-NL-Dot1q-STD-1G-PRI-JP-170" -equinix_zside_port_name = "ops-user100-CX-DA1-L-Dot1q-BO-10G-PRI-JP-13" diff --git a/modules/port-2-service-profile-private/variables.tf b/modules/port-2-service-profile-private/variables.tf deleted file mode 100644 index 600d77dc..00000000 --- a/modules/port-2-service-profile-private/variables.tf +++ /dev/null @@ -1,21 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_tag" {} -variable "zside_ap_type" {} -variable "zside_link_protocol_type" {} -variable "zside_link_protocol_tag" {} -variable "zside_ap_profile_type" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "equinix_aside_port_name" {} -variable "equinix_zside_port_name" {} \ No newline at end of file diff --git a/modules/port-2-service-profile-public/README.md b/modules/port-2-service-profile-public/README.md deleted file mode 100644 index 94186fe1..00000000 --- a/modules/port-2-service-profile-public/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# ECX Fabric Layer2 public seller profile - -This example shows how to create layer2 between ECX Fabric Port and Public Seller Profile. - -## Adjust variables -- `equinix_client_id` - Equinix client ID (consumer key), obtained after registering app in the developer platform -- `equinix_client_secret` - Equinix client secret ID (consumer secret), obtained same way as above -- `fabric_sp_name` - Service profile name like i.e. **Cross Cust SP** -- `aside_port_name` - Name of ECX Fabric port that should be connected used for the connection, i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-000 -- `connection_name` - the name of the connection -- `connection_type` - connection type, please refer schema -- `notifications_type` - notification type -- `notifications_emails` - List of emails -- `bandwidth` - bandwidth in MBs -- `redundancy` - Port redundancy -- `aside_ap_type` - Access point type -- `aside_port_uuid` - Port uuid, fetched based on port call using Port resource -- `aside_link_protocol_type` - link protocol type -- `aside_link_protocol_tag` - tag number -- `zside_ap_type` - Z side access point type -- `zside_ap_profile_type` - Service profile type -- `zside_ap_profile_uuid` - Service profile uuid, fetched based on Service Profile get call using Service Profile search schema -- `zside_location` - Seller location - -## Initialize -- First step is to initialize the terraform directory/resource we are going to work on. - In the given example, the folder to perform CRUD operations for port2serviceprofilepublic connection can be found at examples/fabric/v4/portConnectivity/port2serviceprofilepublic/. - -- Change directory into - `CD examples/fabric/v4/portConnectivity/port2serviceprofilepublic/` -- Initialize Terraform plugins - `terraform init` - -## Port to Service Profile Public connection : Create, Read, Update and Delete(CRUD) operations -Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. - -| Operation | Command | Description | -|:----------|:---------------------------------:|----------------------------------------------------------------------------------------:| -| CREATE | `terraform apply –auto-approve` | Creates a port2serviceprofilepublic connection resource | -| READ | `terraform show` | Reads/Shows the current state of the port2serviceprofilepublic connection resource | -| UPDATE | `terraform apply -refresh` | Updates the port2serviceprofilepublic with values provided in the terraform.tfvars file | -| DELETE | `terraform destroy –auto-approve` | Deletes the created port2serviceprofilepublic connection resource | diff --git a/modules/port-2-service-profile-public/main.tf b/modules/port-2-service-profile-public/main.tf deleted file mode 100644 index 1248719f..00000000 --- a/modules/port-2-service-profile-public/main.tf +++ /dev/null @@ -1,60 +0,0 @@ -provider "equinix" { - client_id = var.equinix_client_id - client_secret = var.equinix_client_secret -} - -data "equinix_fabric_service_profiles" "public_sp" { - filter { - property = "/name" - operator = "=" - values = [var.fabric_sp_name] - } -} - -data "equinix_fabric_ports" "aside" { - filters { - name = var.aside_port_name - } -} - -resource "equinix_fabric_connection" "port2profile" { - name = var.connection_name - type = var.connection_type - notifications{ - type=var.notifications_type - emails=var.notifications_emails - } - bandwidth = var.bandwidth - redundancy {priority= var.redundancy} - order { - purchase_order_number= var.purchase_order_number - } - a_side { - access_point { - type= var.aside_ap_type - port { - uuid= data.equinix_fabric_ports.aside.data.0.uuid - } - link_protocol { - type= var.aside_link_protocol_type - vlan_tag= var.aside_link_protocol_tag - } - } - } - z_side { - access_point { - type= var.zside_ap_type - profile { - type= var.zside_ap_profile_type - uuid= data.equinix_fabric_service_profiles.public_sp.data.0.uuid - } - location { - metro_code= var.zside_location - } - } - } -} - -output "connection_result" { - value = equinix_fabric_connection.port2profile.id -} diff --git a/modules/port-2-service-profile-public/terraform.tf b/modules/port-2-service-profile-public/terraform.tf deleted file mode 100644 index fd41df1c..00000000 --- a/modules/port-2-service-profile-public/terraform.tf +++ /dev/null @@ -1,7 +0,0 @@ -terraform { - required_providers { - equinix = { - source = "equinix/equinix" - } - } -} diff --git a/modules/port-2-service-profile-public/terraform.tfvars.example b/modules/port-2-service-profile-public/terraform.tfvars.example deleted file mode 100644 index 28b70dbc..00000000 --- a/modules/port-2-service-profile-public/terraform.tfvars.example +++ /dev/null @@ -1,20 +0,0 @@ -equinix_client_id = "MyEquinixClientId" -equinix_client_secret = "MyEquinixSecret" - -connection_name = "terra_e2e_sppublic" -connection_type = "EVPL_VC" -notifications_type = "ALL" -notifications_emails = ["example@equinix.com"] -bandwidth = 50 -redundancy = "PRIMARY" -purchase_order_number = "1-323292" -aside_ap_type = "COLO" -aside_port_uuid = "c4d9350e-783c-83cd-1ce0-306a5c00a600" -aside_link_protocol_type = "DOT1Q" -aside_link_protocol_tag = "2019" -zside_ap_type = "SP" -zside_ap_profile_type = "L2_PROFILE" -zside_ap_profile_uuid = "bfb74121-7e2c-4f74-99b3-69cdafb03b41" -zside_location = "SV" -fabric_sp_name = "Cross Cust SP" -aside_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-1G-PRI-NK-349" diff --git a/modules/port-2-service-profile-public/variables.tf b/modules/port-2-service-profile-public/variables.tf deleted file mode 100644 index 5165055b..00000000 --- a/modules/port-2-service-profile-public/variables.tf +++ /dev/null @@ -1,20 +0,0 @@ -variable "equinix_client_id" {} -variable "equinix_client_secret" {} - -variable "connection_name" {} -variable "connection_type" {} -variable "notifications_type" {} -variable "notifications_emails" {} -variable "bandwidth" {} -variable "redundancy" {} -variable "purchase_order_number" {} -variable "aside_ap_type" {} -variable "aside_port_uuid" {} -variable "aside_link_protocol_type" {} -variable "aside_link_protocol_tag" {} -variable "zside_ap_type" {} -variable "zside_ap_profile_type" {} -variable "zside_ap_profile_uuid" {} -variable "zside_location" {} -variable "fabric_sp_name" {} -variable "aside_port_name" {} \ No newline at end of file diff --git a/modules/port-connection/README.md b/modules/port-connection/README.md new file mode 100644 index 00000000..e69de29b diff --git a/modules/port-connection/main.tf b/modules/port-connection/main.tf new file mode 100644 index 00000000..f7772718 --- /dev/null +++ b/modules/port-connection/main.tf @@ -0,0 +1,201 @@ +terraform { + required_providers { + equinix = { + source="equinix/equinix" + } + } +} + + +# A-Side can be: +# 1. DOT1Q +# 2. QINQ +# Can be single connection, or redundant connection +# Both ports do not have have to have the same encapsulation. We can have any combination. + +# Z-Side connection types +# 1. Port +# 2. Service Profile + +data "equinix_fabric_ports" "aside_port" { + filters { + name = var.aside_port_name + } +} + +data "equinix_fabric_ports" "aside_secondary_port" { + count = var.aside_secondary_port_name != "" ? 1 : 0 + filters { + name = var.aside_secondary_port_name + } +} + +data "equinix_fabric_service_profiles" "zside_sp" { + count = var.zside_ap_type == "SP" ? 1 : 0 + filter { + property = "/name" + operator = "=" + values = [var.zside_sp_name] + } +} + +data "equinix_fabric_ports" "zside_port" { + count = var.zside_ap_type == "COLO" ? 1 : 0 + filters { + name = var.zside_port_name + } +} + +resource "equinix_fabric_connection" "primary_port_connection" { + name = var.connection_name + type = var.connection_type + notifications { + type = var.notifications_type + emails = var.notifications_emails + } + bandwidth = var.bandwidth + redundancy { priority = "PRIMARY" } + order { + purchase_order_number = var.purchase_order_number + } + + additional_info = var.primary_additional_info != [] ? var.primary_additional_info : null + + a_side { + access_point { + type = "COLO" + port { + uuid = data.equinix_fabric_ports.aside_port.data.0.uuid + } + link_protocol { + type = one(data.equinix_fabric_ports.aside_port.data.0.encapsulation).type + vlan_tag = one(data.equinix_fabric_ports.aside_port.data.0.encapsulation).type == "DOT1Q" ? var.aside_vlan_tag : null + vlan_s_tag = one(data.equinix_fabric_ports.aside_port.data.0.encapsulation).type == "QINQ" ? var.aside_vlan_tag : null + + # This is adding ctag for any connection that is QINQ Aside AND not COLO on Zside OR when COLO on Zside is not QINQ Encapsulation Type + vlan_c_tag = one(data.equinix_fabric_ports.aside_port.data.0.encapsulation).type == "QINQ" && (var.zside_ap_type != "COLO" || (var.zside_ap_type == "COLO" ? one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type != "QINQ" : false)) ? var.aside_vlan_inner_tag : null + } + } + } + + dynamic "z_side" { + # Service Profile Z_Side Type + for_each = var.zside_ap_type == "SP" ? [1] : [] + content { + access_point { + type = var.zside_ap_type + authentication_key = var.zside_ap_authentication_key + seller_region = var.zside_seller_region != "" ? var.zside_seller_region : null + profile { + type = var.zside_ap_profile_type + uuid = data.equinix_fabric_service_profiles.zside_sp[0].data.0.uuid + } + location { + metro_code = var.zside_location + } + peering_type = var.zside_peering_type != "" ? var.zside_peering_type : null + } + } + } + + dynamic "z_side" { + # Port Z_Side Type + for_each = var.zside_ap_type == "COLO" ? [1] : [] + content { + access_point { + type = var.zside_ap_type + port { + uuid = data.equinix_fabric_ports.zside_port[0].data.0.uuid + } + link_protocol { + type = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type + vlan_tag = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type == "DOT1Q" ? var.zside_vlan_tag : null + vlan_s_tag = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type == "QINQ" ? var.zside_vlan_tag : null + vlan_c_tag = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type == "QINQ" && one(data.equinix_fabric_ports.aside_port.data.0.encapsulation).type != "QINQ" ? var.zside_vlan_inner_tag : null + } + location { + metro_code = var.zside_location + } + } + } + } +} + +resource "equinix_fabric_connection" "secondary_port_connection" { + count = var.aside_secondary_port_name != "" ? 1 : 0 + name = var.secondary_connection_name + type = var.connection_type + notifications { + type = var.notifications_type + emails = var.notifications_emails + } + bandwidth = var.secondary_bandwidth + redundancy { + priority = "SECONDARY" + group = one(equinix_fabric_connection.primary_port_connection.redundancy).group + } + order { + purchase_order_number = var.purchase_order_number + } + + additional_info = var.secondary_additional_info != [] ? var.secondary_additional_info : null + + a_side { + access_point { + type = "COLO" + port { + uuid = data.equinix_fabric_ports.aside_secondary_port[0].data.0.uuid + } + link_protocol { + type = one(data.equinix_fabric_ports.aside_secondary_port[0].data.0.encapsulation).type + vlan_tag = one(data.equinix_fabric_ports.aside_secondary_port[0].data.0.encapsulation).type == "DOT1Q" ? var.aside_vlan_tag : null + vlan_s_tag = one(data.equinix_fabric_ports.aside_secondary_port[0].data.0.encapsulation).type == "QINQ" ? var.aside_vlan_tag : null + + # This is adding ctag for any connection that is QINQ Aside AND not COLO on Zside OR when COLO on Zside is not QINQ Encapsulation Type + vlan_c_tag = one(data.equinix_fabric_ports.aside_secondary_port[0].data.0.encapsulation).type == "QINQ" && (var.zside_ap_type != "COLO" || (var.zside_ap_type == "COLO" ? one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type != "QINQ" : false)) ? var.aside_vlan_inner_tag : null + } + } + } + + dynamic "z_side" { + # Service Profile Z_Side Type + for_each = var.zside_ap_type == "SP" ? [1] : [] + content { + access_point { + type = var.zside_ap_type + authentication_key = var.zside_ap_authentication_key + seller_region = var.zside_seller_region + profile { + type = var.zside_ap_profile_type + uuid = data.equinix_fabric_service_profiles.zside_sp[0].data.0.uuid + } + location { + metro_code = var.zside_location + } + peering_type = var.zside_peering_type != "" ? var.zside_peering_type : null + } + } + } + + dynamic "z_side" { + # Port Z_Side Type + for_each = var.zside_ap_type == "COLO" ? [1] : [] + content { + access_point { + type = var.zside_ap_type + port { + uuid = data.equinix_fabric_ports.zside_port[0].data.0.uuid + } + link_protocol { + type = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type + vlan_tag = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type == "DOT1Q" ? var.zside_vlan_tag : null + vlan_s_tag = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type == "QINQ" ? var.zside_vlan_tag : null + vlan_c_tag = one(data.equinix_fabric_ports.zside_port[0].data.0.encapsulation).type == "QINQ" && one(data.equinix_fabric_ports.aside_port.data.0.encapsulation).type != "QINQ" ? var.zside_vlan_inner_tag : null + } + location { + metro_code = var.zside_location + } + } + } + } +} diff --git a/modules/port-connection/outputs.tf b/modules/port-connection/outputs.tf new file mode 100644 index 00000000..8c3b1f59 --- /dev/null +++ b/modules/port-connection/outputs.tf @@ -0,0 +1,7 @@ +output "primary_connection_id" { + value = equinix_fabric_connection.primary_port_connection.id +} + +output "secondary_connection_id" { + value = var.aside_secondary_port_name != "" ? equinix_fabric_connection.secondary_port_connection[0].id : null +} diff --git a/modules/port-connection/variables.tf b/modules/port-connection/variables.tf new file mode 100644 index 00000000..1dd73990 --- /dev/null +++ b/modules/port-connection/variables.tf @@ -0,0 +1,127 @@ +variable "connection_name" { + description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string +} + +variable "secondary_connection_name" { + description = "Secondary Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" + type = string + default = "" +} + +variable "connection_type" { + description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" + type = string +} + +variable "notifications_type" { + description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS" + type = string +} + +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} + +variable "bandwidth" { + description = "Connection bandwidth in Mbps" + type = number +} + +variable "secondary_bandwidth" { + description = "Connection bandwidth in Mbps for the secondary connection" + type = number + default = 0 +} + +variable "purchase_order_number" { + description = "Purchase order number" + type = string +} + +variable "aside_port_name" { + description = "Equinix A-Side Port Name; your tagging must match the encapsulation type of the port (DOT1Q or QINQ)" + type = string +} + +variable "aside_secondary_port_name" { + description = "Equinix A-Side Port Name; your tagging must match the encapsulation type of the port (DOT1Q or QINQ)" + type = string + default = "" +} + +variable "aside_vlan_tag" { + description = "VLan Tag information for DOT1Q connections, and the outer VLan tag for QINQ connections)" + type = string +} + +variable "aside_vlan_inner_tag" { + description = "VLan Tag information for DOT1Q connections" + type = string + default = "" +} + +variable "zside_ap_type" { + description = "Access point type - VD, SP, COLO, CLOUD_ROUTER, NETWORK" + type = string +} +variable "zside_ap_authentication_key" { + description = "Authentication key for provider based connections" + type = string + default = "" +} +variable "zside_ap_profile_type" { + description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" + type = string + default = "" +} +variable "zside_location" { + description = "Access point metro code" + type = string +} +variable "zside_sp_name" { + description = "Equinix Service Profile Name" + type = string + default = "" +} +variable "zside_port_name" { + description = "Equinix Z-Side Port Name" + type = string + default = "" +} +variable "zside_seller_region" { + description = "Access point seller region" + type = string + default = "" +} + +variable "zside_vlan_tag" { + description = "VLan Tag information for DOT1Q connections, and the outer VLan tag for QINQ connections" + type = string + default = "" +} + +variable "zside_vlan_inner_tag" { + description = "Inner VLan tag for QINQ connections" + type = string + default = "" +} + +variable "zside_peering_type" { + description = "Zside Access Point Peering type. Available values; PRIVATE, MICROSOFT, PUBLIC, MANUAL" + type = string + default = "" +} + +variable "primary_additional_info" { + description = "Additional info parameters. It's a list of maps containing 'key' and 'value' keys with their corresponding values." + type = list(object({key = string, value = string})) + default = [] +} + +variable "secondary_additional_info" { + description = "Additional info parameters. It's a list of maps containing 'key' and 'value' keys with their corresponding values." + type = list(object({key = string, value = string})) + default = [] +}