Skip to content

Commit

Permalink
docs: updated equinix_metal_connection examples (#780)
Browse files Browse the repository at this point in the history
- some examples with ecx resource were updated with the fabric resource
but without using the correct fabric fields
- renaming examples to use the same terminology as that available in the
documentation
https://deploy.equinix.com/developers/docs/metal/interconnections/fabric-billed-fabric-vc/
https://deploy.equinix.com/developers/docs/metal/interconnections/metal-billed-fabric-vc/
- fixed errors in examples (tested)
- removed note "Service Token A-side / Z-side (service_token_type) is
not generally available" since it's been GA for more than a year
- Removed example using legacy not automated workflow since it was
deprecated
- fixes #777
  • Loading branch information
ocobles authored Sep 27, 2024
2 parents 0ceca3c + faa9991 commit b1ed71b
Show file tree
Hide file tree
Showing 12 changed files with 544 additions and 402 deletions.
428 changes: 263 additions & 165 deletions docs/resources/metal_connection.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
resource "equinix_metal_vlan" "example" {
project_id = "<metal_project_id>"
metro = "FR"
}

resource "equinix_metal_connection" "example" {
name = "tf-metal-from-port"
project_id = "<metal_project_id>"
type = "shared"
redundancy = "primary"
metro = "FR"
speed = "200Mbps"
service_token_type = "z_side"
contact_email = "username@example.com"
vlans = [equinix_metal_vlan.example.vxlan]
}

data "equinix_fabric_ports" "a_side" {
filters {
name = "<name_of_port||port_prefix>"
}
}

resource "equinix_fabric_connection" "example" {
name = "tf-metal-from-port"
type = "EVPL_VC"
bandwidth = "200"
notifications {
type = "ALL"
emails = ["username@example.com"]
}
order { purchase_order_number = "1-323292" }
project { project_id = "<fabric_project_id>" }
a_side {
access_point {
type = "COLO"
port {
uuid = data.equinix_fabric_ports.a_side.data.0.uuid
}
link_protocol {
type = "DOT1Q"
vlan_tag = 1234
}
}
}
z_side {
service_token {
uuid = equinix_metal_connection.example.service_tokens.0.id
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
resource "equinix_metal_vlan" "example1" {
project_id = "<metal_project_id>"
metro = "SV"
}

resource "equinix_metal_connection" "example" {
name = "tf-metal-from-fcr"
project_id = "<metal_project_id>"
metro = "SV"
redundancy = "primary"
type = "shared_port_vlan"
contact_email = "username@example.com"
speed = "200Mbps"
vlans = [equinix_metal_vlan.example1.vxlan]
}

resource "equinix_fabric_connection" "example" {
name = "tf-metal-from-fcr"
type = "IP_VC"
bandwidth = "200"
notifications {
type = "ALL"
emails = ["username@example.com"]
}
project { project_id = "<fabric_project_id>" }
a_side {
access_point {
type = "CLOUD_ROUTER"
router {
uuid = equinix_fabric_cloud_router.example.id
}
}
}
z_side {
access_point {
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.example.authorization_code
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
resource "equinix_metal_vrf" "example" {
name = "tf-metal-from-ne"
metro = "FR"
local_asn = "65001"
ip_ranges = ["10.99.1.0/24"]
project_id = equinix_metal_project.test.id
}

resource "equinix_metal_connection" "example" {
name = "tf-metal-from-ne"
project_id = "<metal_project_id>"
type = "shared"
redundancy = "primary"
metro = "FR"
speed = "200Mbps"
service_token_type = "z_side"
contact_email = "username@example.com"
vrfs = [equinix_metal_vrf.example.vxlan]
}

resource "equinix_fabric_connection" "example" {
name = "tf-metal-from-ne"
type = "EVPL_VC"
bandwidth = "200"
notifications {
type = "ALL"
emails = ["username@example.com"]
}
order { purchase_order_number = "1-323292" }
project { project_id = "<fabric_project_id>" }
a_side {
access_point {
type = "VD"
virtual_device {
type = "EDGE"
uuid = equinix_network_device.example.id
}
}
}
z_side {
service_token {
uuid = equinix_metal_connection.example.service_tokens.0.id
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
resource "equinix_metal_connection" "example" {
name = "tf-metal-2-azure"
project_id = "<metal_project_id>"
type = "shared"
redundancy = "redundant"
metro = "SV"
speed = "1Gbps"
service_token_type = "a_side"
contact_email = "username@example.com"
}

data "equinix_fabric_service_profiles" "zside" {
filter {
property = "/name"
operator = "="
values = ["Azure ExpressRoute"]
}
}

resource "equinix_fabric_connection" "example_primary" {
name = "tf-metal-2-azure-pri"
type = "EVPL_VC"
bandwidth = azurerm_express_route_circuit.example.bandwidth_in_mbps
redundancy { priority = "PRIMARY" }
notifications {
type = "ALL"
emails = ["username@example.com"]
}
project { project_id = "<fabric_project_id>" }
a_side {
service_token {
uuid = equinix_metal_connection.example.service_tokens.0.id
}
}
z_side {
access_point {
type = "SP"
authentication_key = azurerm_express_route_circuit.example.service_key
profile {
type = "L2_PROFILE"
uuid = data.equinix_fabric_service_profiles.zside.id
}
location {
metro_code = "SV"
}
}
}
}

resource "equinix_fabric_connection" "example_secondary" {
name = "tf-metal-2-azure-sec"
type = "EVPL_VC"
bandwidth = azurerm_express_route_circuit.example.bandwidth_in_mbps
redundancy {
priority = "SECONDARY"
group = one(equinix_fabric_connection.example_primary.redundancy).group
}
notifications {
type = "ALL"
emails = ["username@example.com"]
}
project { project_id = "<fabric_project_id>" }
a_side {
service_token {
uuid = equinix_metal_connection.example.service_tokens.1.id
}
}
z_side {
access_point {
type = "SP"
authentication_key = azurerm_express_route_circuit.example.service_key
profile {
type = "L2_PROFILE"
uuid = data.equinix_fabric_service_profiles.zside.id
}
location {
metro_code = "SV"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
resource "equinix_metal_connection" "example" {
name = "tf-metal-2-port"
project_id = "<metal_project_id>"
type = "shared"
redundancy = "redundant"
metro = "FR"
speed = "1Gbps"
service_token_type = "a_side"
contact_email = "username@example.com"
}

data "equinix_fabric_ports" "a_side" {
filters {
name = "<name_of_port||port_prefix>"
}
}

resource "equinix_fabric_connection" "example" {
name = "tf-metal-2-port"
type = "EVPL_VC"
notifications {
type = "ALL"
emails = ["username@example.com"]
}
project {
project_id = "<fabric_project_id>"
}
bandwidth = "100"
order {
purchase_order_number = "1-323292"
}
a_side {
service_token {
uuid = equinix_metal_connection.example.service_tokens.0.id
}
}
z_side {
access_point {
type = "COLO"
port {
uuid = data.equinix_fabric_ports.a_side.data.0.uuid
}
link_protocol {
type = "DOT1Q"
vlan_tag = 1234
}
}
}
}



This file was deleted.

This file was deleted.

Loading

0 comments on commit b1ed71b

Please sign in to comment.