-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: updated equinix_metal_connection examples (#780)
- 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
Showing
12 changed files
with
544 additions
and
402 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
examples/resources/equinix_metal_connection/fabric_billed_metal_from_fabric_port.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,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 | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
examples/resources/equinix_metal_connection/fabric_billed_metal_from_fcr.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,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 | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
examples/resources/equinix_metal_connection/fabric_billed_metal_from_network_edge.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,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 | ||
} | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
examples/resources/equinix_metal_connection/metal_billed_metal_to_csp.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,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" | ||
} | ||
} | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
examples/resources/equinix_metal_connection/metal_billed_metal_to_fabric_port.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,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 | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
|
42 changes: 0 additions & 42 deletions
42
examples/resources/equinix_metal_connection/shared_metal_fabric_connection_from_fcr.tf
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
examples/resources/equinix_metal_connection/shared_metal_fabric_connection_to_csp.tf
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.