-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add redundant connection to Port2Azure and update variables+README.md…
… for both single and redundant Port2Azure Examples
- Loading branch information
Showing
10 changed files
with
249 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 2 additions & 5 deletions
7
...nnectivity/azure/terraform.tfvars.example → ...singleConnection/terraform.tfvars.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
equinix_client_id = "MyEquinixClientId" | ||
equinix_client_secret = "MyEquinixSecret" | ||
|
||
connection_name = "terra_e2e_azure" | ||
connection_name = "Terra_Port2Azure" | ||
connection_type = "EVPL_VC" | ||
notifications_type = "ALL" | ||
notifications_emails = ["[email protected]"] | ||
bandwidth = 50 | ||
redundancy = "PRIMARY" | ||
purchase_order_number = "1-323292" | ||
aside_ap_type = "COLO" | ||
peering_type="MICROSOFT" | ||
aside_port_uuid = "c4d9350e-783c-83cd-1ce0-306a5c00a600" | ||
aside_link_protocol_type = "QINQ" | ||
aside_link_protocol_stag = "2019" | ||
zside_ap_type = "SP" | ||
zside_ap_authentication_key = "c620477c-3f30-41e8-a0b9-cfdb4a31034b" | ||
zside_ap_authentication_key = "Azure Express Route Service Key" | ||
zside_ap_profile_type = "L2_PROFILE" | ||
zside_ap_profile_uuid = "bfb74121-7e2c-4f74-99b3-69cdafb03b41" | ||
zside_location = "SV" | ||
fabric_sp_name = "Azure ExpressRoute" | ||
equinix_port_name = "ops-user100-CX-SV1-NL-Qinq-STD-1G-PRI-NK-349" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
examples/fabric/v4/portConnectivity/azure/twoRedundantConnections/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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 | ||
|
||
Change directory to project root to run terra test or change to example directory and initialize Terraform plugins | ||
by running `terraform init`. | ||
|
||
## Deploy template | ||
|
||
Apply changes by running `terraform apply`, then **inspect proposed plan** | ||
and approve it. |
115 changes: 115 additions & 0 deletions
115
examples/fabric/v4/portConnectivity/azure/twoRedundantConnections/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
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 | ||
} |
7 changes: 7 additions & 0 deletions
7
examples/fabric/v4/portConnectivity/azure/twoRedundantConnections/terraform.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
terraform { | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
examples/fabric/v4/portConnectivity/azure/twoRedundantConnections/terraform.tfvars.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
equinix_client_id = "MyEquinixClientId" | ||
equinix_client_secret = "MyEquinixSecret" | ||
|
||
pri_connection_name = "terraform_port2azure_pri" | ||
sec_connection_name = "terraform_port2azure_sec" | ||
connection_type = "EVPL_VC" | ||
notifications_type = "ALL" | ||
notifications_emails = ["[email protected]"] | ||
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" |
21 changes: 21 additions & 0 deletions
21
examples/fabric/v4/portConnectivity/azure/twoRedundantConnections/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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" {} |