本文へスキップ

~>非推奨のお知らせ Equinix Metalは、2026年6月30日 でサポートを終了します。すべてのMetalリソースは、このプロバイダのバージョン5.0.0で削除されます。廃止までの継続利用には、このプロバイダのバージョン4.xをご利用ください。詳細は https://docs.equinix.com/metal/ をご覧ください。

equinix_metal_connection(リソース)

Equinix Fabric - Software-Defined Interconnectionsを利用して他者と接続するためのインターコネクションアセットを作成するには、このリソースをご利用ください。

使用例

ファブリック課金型共有仮想接続 - お客様のEquinix FabricポートからEquinix Metalへの冗長性のない接続です。

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
}
}
}

-> 注: ファブリックポート、ネットワークEdgeデバイス、サービストークンからの本格的な接続例を示したEquinix Fabric L2 Connection To Equinix Metal Terraformモジュールがあります。サイドService Tokenとの共有接続例をご覧ください。

Fabric Billed共有仮想接続 - お客様所有のNetwork EdgeデバイスからEquinix Metalへの非冗長接続

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
}
}
}

ファブリック課金型共有仮想接続- Equinix Fabric Cloud RouterからEquinix Metalへの非冗長接続

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
}
}
}

メタル課金型共有仮想接続 - Equinix Metalからクラウドサービスプロバイダーへの冗長接続

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"
}
}
}
}

-> 注: ファブリックポート、ネットワークエッジデバイス、またはService Tokenから一般的なクラウドサービスプロバイダーへの本格的な接続例を含む、複数のEquinix Fabric L2 Connection Terraformモジュールが利用可能です。Equinix Metal共有接続のA側Service Tokenを含む例をご覧ください:AWS, Azure, [Google Cloud, [IBM Cloud, [Oracle Cloud, [Alibaba Cloud.

メタル課金型共有仮想接続 - Equinix Metalからお客様のEquinix Fabricポートへの非冗長接続

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
}
}
}
}

スキーマ

必須

  • name (文字列) 接続リソース名
  • redundancy (文字列) 接続の冗長性 - 冗長かプライマリか
  • type (文字列) 接続タイプ - 専用、共有、または shared_port_vlan

オプション

  • contact_email (文字列) Equinix Fabricの相互接続に関する連絡や通知に使用する優先メール アドレス
  • description (文字列) 接続リソースの説明
  • facility (文字列、非推奨) 接続が作成される施設
  • metro (文字列) 接続が作成されるメトロ
  • mode (文字列) IBX設備の専用タイプでの接続モード - 標準またはトンネル
  • organization_id (文字列) 接続を担当する組織の ID。タイプ "専用" で適用可能
  • project_id (文字列) 接続がスコープされるプロジェクトの ID。タイプ "shared" では必須です。
  • service_token_type (文字列) 共有接続でのみ使用されます。接続に使用するサービス・トークンのタイプ。
  • speed (String) 接続速度 - 値は「Mbps」または「Gpbs」の形式である必要があります(例:「100Mbps」または「50Gbps」)。 実際にサポートされる値は、接続タイプ、接続が VLAN または VRF を使用するかどうかによって異なります。
  • tags(文字列のリスト)接続に付けられたタグ
  • vlans(番号のリスト) 共有接続でのみ使用されます。アタッチする VLAN。プライマリ/シングル接続には1つのVLANを、冗長接続には2つのVLANを渡します。
  • vrfs (文字列のリスト) 共有接続でのみ使用されます。アタッチする VRF。プライマリ/シングル接続の場合は VRF を 1 つ、冗長接続の場合は VRF を 2 つ渡します。

読み取り専用

  • authorization_code (String) Fabric Shared 接続でのみ使用されます。Fabric 内からリソースを表示する際、Fabric はこのトークンを使用して、ネットワークの Metal エンドに関するより詳細な情報を提供できるようにします。
  • id (文字列) リ ソ ース の一意な識別子
  • ports (オブジェクトのリスト) 接続ポートのリスト - プライマリ (ports[0]) とセカンダリ (ports[1]) (入れ子になったスキーマは以下を参照](#nestedatt--ports))
  • service_tokens (オブジェクトのリスト) 共有接続でのみ使用されます。equinix_fabric_connection、または[Equinix Fabric Portalでセットアッププロセスを続行する際に必要なサービストークンのリストです(ネストされたスキーマについては下記を参照)。
  • status (文字列) 接続リソースのステータス
  • token (String, Deprecated) 共有接続でのみ使用されます。equinix_fabric_connectionまたは[Equinix Fabric Portalで設定プロセスを続行する際に必要なFabric Tokenです。

portsの入れ子スキーマ

読み取り専用:

  • id (文字列)
  • link_status (文字列)
  • name (文字列)
  • role (文字列)
  • speed (番号)
  • status (文字列)
  • virtual_circuit_ids (文字列のリスト)

service_tokensの入れ子スキーマ

読み取り専用:

  • expires_at (文字列)
  • id (文字列)
  • max_allowed_speed (文字列)
  • role (文字列)
  • state (文字列)
  • type (文字列)
このページは役に立ちましたか?