-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding Port Term Based Connections examples (#167)
* feat: Adding Port Term Based Connections examples * feat: Updating port modules to support term based examples * fix: Updating Equinix Provider Version * fix: Updating term_length default value to zero
- Loading branch information
1 parent
216e674
commit 2eec22c
Showing
15 changed files
with
303 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Fabric Port to Fabric Network Term Based Connection | ||
|
||
This example shows how to leverage the [Fabric Port Connection Module](https://registry.terraform.io/modules/equinix/fabric/equinix/latest/submodules/port-connection) | ||
to create a Fabric Term Based Connection from a Fabric Port to Fabric Network. | ||
|
||
It leverages the Equinix Terraform Provider,and the Fabric Port Connection | ||
Module to setup the connection based on the parameters you have provided to this example; or based on the pattern | ||
you see used in this example it will allow you to create a more specific use case for your own needs. | ||
|
||
See example usage below for details on how to use this example. | ||
|
||
<!-- BEGIN_TF_DOCS --> | ||
<!-- END_TF_DOCS --> |
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,24 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "create_port_2_network_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 | ||
term_length = var.term_length | ||
|
||
# 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_network_uuid = var.zside_network_uuid | ||
} |
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,8 @@ | ||
output "port_connection" { | ||
value = module.create_port_2_network_connection.primary_connection | ||
sensitive = true | ||
} | ||
|
||
output "port_connection_id" { | ||
value = module.create_port_2_network_connection.primary_connection_id | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/port-2-network-term-based-connection/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,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" | ||
term_length = 12 | ||
aside_port_name = "ops-user100-CX-SV5-NL-Qinq-STD-1G-SEC-JP-190" | ||
aside_location = "DC" | ||
aside_vlan_tag = "1976" | ||
zside_ap_type = "NETWORK" | ||
zside_network_uuid = "0a7c6e03-5d9a-4dfd-bb46-a6fa3fbde231" |
66 changes: 66 additions & 0 deletions
66
examples/port-2-network-term-based-connection/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,66 @@ | ||
variable "equinix_client_id" { | ||
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "equinix_client_secret" { | ||
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
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 is the only type currently supported" | ||
type = string | ||
default = "ALL" | ||
} | ||
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 | ||
default = "" | ||
} | ||
variable "term_length" { | ||
description = "Order Term Length" | ||
type = number | ||
default = 1 | ||
} | ||
variable "aside_port_name" { | ||
description = "Equinix A-Side Port Name" | ||
type = string | ||
} | ||
variable "aside_location" { | ||
description = "Aside metro code" | ||
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_network_uuid" { | ||
description = "Equinix Network UUID" | ||
type = string | ||
} |
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,9 @@ | ||
terraform { | ||
required_version = ">= 1.5.4" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = ">= 3.2.0" | ||
} | ||
} | ||
} |
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,13 @@ | ||
# Fabric Port to Fabric Port Term Based Connection | ||
|
||
This example shows how to leverage the [Fabric Port Connection Module](https://registry.terraform.io/modules/equinix/fabric/equinix/latest/submodules/port-connection) | ||
to create a Fabric Term Based Connection from a Fabric Port to Fabric Port. | ||
|
||
It leverages the Equinix Terraform Provider, and the Fabric Port Connection | ||
Module to setup the connection based on the parameters you have provided to this example; or based on the pattern | ||
you see used in this example it will allow you to create a more specific use case for your own needs. | ||
|
||
See example usage below for details on how to use this example. | ||
|
||
<!-- BEGIN_TF_DOCS --> | ||
<!-- END_TF_DOCS --> |
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,27 @@ | ||
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 | ||
term_length = var.term_length | ||
|
||
# A-side | ||
aside_port_name = var.aside_port_name | ||
aside_vlan_tag = var.aside_vlan_tag | ||
aside_location = var.aside_location | ||
|
||
# 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 | ||
} |
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,8 @@ | ||
output "port_connection" { | ||
value = module.create_port_2_port_connection.primary_connection | ||
sensitive = true | ||
} | ||
|
||
output "port_connection_id" { | ||
value = module.create_port_2_port_connection.primary_connection_id | ||
} |
17 changes: 17 additions & 0 deletions
17
examples/port-2-port-term-based-connection/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,17 @@ | ||
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" | ||
term_length = 12 | ||
aside_port_name = "ops-user100-CX-SV5-NL-Qinq-STD-1G-SEC-JP-190" | ||
aside_location = "DC" | ||
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" |
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,74 @@ | ||
variable "equinix_client_id" { | ||
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "equinix_client_secret" { | ||
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
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 is the only type currently supported" | ||
type = string | ||
default = "ALL" | ||
} | ||
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 | ||
default = "" | ||
} | ||
variable "term_length" { | ||
description = "Order Term Length" | ||
type = number | ||
default = 1 | ||
} | ||
variable "aside_port_name" { | ||
description = "Equinix A-Side Port Name" | ||
type = string | ||
} | ||
variable "aside_location" { | ||
description = "Aside metro code" | ||
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 = "Zside 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 | ||
} |
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,9 @@ | ||
terraform { | ||
required_version = ">= 1.5.4" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = ">= 3.2.0" | ||
} | ||
} | ||
} |
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
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