From 8d8dfeda3f9824460149ec7a79949b6e8b8dbaeb Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Thu, 18 Jul 2024 14:02:19 -0700 Subject: [PATCH 1/4] fix:updating documentation for NIMf connection example in Metal Connection Resource --- docs/data-sources/metal_connection.md | 1 + docs/resources/fabric_connection.md | 74 ++++++++++++++- docs/resources/metal_connection.md | 126 ++++++++++++++++++++++++++ 3 files changed, 198 insertions(+), 3 deletions(-) diff --git a/docs/data-sources/metal_connection.md b/docs/data-sources/metal_connection.md index 4e98408fd..c2c459a52 100644 --- a/docs/data-sources/metal_connection.md +++ b/docs/data-sources/metal_connection.md @@ -56,3 +56,4 @@ In addition to all arguments above, the following attributes are exported: * `link_status` - Port link status. * `virtual_circuit_ids` - List of IDs of virtual cicruits attached to this port. * `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](../resources/fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. +* `authorization_code` - Fabric Authorization Code to configure the NIMF connection in Equinix Fabric with the [equinix_fabric_connection](../resources/fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index 7b2841fd0..bc5912444 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -663,6 +663,74 @@ resource "equinix_fabric_connection" "epl" { } ``` +NIMF Metal to AWS EVPL_VC Connection + +```terraform +resource "equinix_fabric_connection" "metal2aws" { + name = "ConnectionName" + type = "EVPLAN_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "METAL_NETWORK" + authentication_key = "" + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} +``` + +NIMF Fabric Cloud Router to Metal IP_VC Connection + +```terraform +resource "equinix_fabric_connection" "fcr2metal" { + name = "ConnectionName" + type = "IP_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "CLOUD_ROUTER" + router { + uuid = "" + } + } + } + z_side { + access_point { + type = "METAL_NETWORK" + authentication_key = "" + } + } +} +``` + ### Notes: Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: @@ -726,7 +794,7 @@ Optional: Optional: -- `authentication_key` (String) Authentication key for provider based connections +- `authentication_key` (String) Authentication key for provider based or Metal NIMF connections - `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--a_side--access_point--gateway)) - `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--a_side--access_point--interface)) - `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--a_side--access_point--link_protocol)) @@ -738,7 +806,7 @@ Optional: - `provider_connection_id` (String) Provider assigned Connection Id - `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--a_side--access_point--router)) - `seller_region` (String) Access point seller region -- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK +- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK - `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--a_side--access_point--virtual_device)) Read-Only: @@ -969,7 +1037,7 @@ Optional: - `provider_connection_id` (String) Provider assigned Connection Id - `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--z_side--access_point--router)) - `seller_region` (String) Access point seller region -- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK +- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK - `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--z_side--access_point--virtual_device)) Read-Only: diff --git a/docs/resources/metal_connection.md b/docs/resources/metal_connection.md index 0b53eb4de..90a72b7c4 100644 --- a/docs/resources/metal_connection.md +++ b/docs/resources/metal_connection.md @@ -128,6 +128,131 @@ resource "equinix_fabric_connection" "example" { } ``` +### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Metal to a Cloud Service Provider via Equinix Fabric Port + +```terraform +resource "equinix_metal_vlan" "example1" { + project_id = local.my_project_id + metro = "SV" +} + +resource "equinix_metal_connection" "example" { + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] +} + +data "equinix_fabric_service_profiles" "zside" { + count = var.zside_ap_type == "SP" ? 1 : 0 + filter { + property = "/name" + operator = "=" + values = ["AWS Direct Connect"] + } +} + +resource "equinix_fabric_connection" "example" { + name = "tf-NIMF-metal-2-aws-legacy" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = "sername@example.com" + } + project { + project_id = local.fabric_project_id + } + bandwidth = "200" + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "METAL_NETWORK" + authentication_key = equinix_metal_connection.metal-connection.authorization_code + } + } + z_side { + access_point { + type = "SP" + authentication_key = local.aws_account_id + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = data.equinix_fabric_service_profiles.zside[0].id + } + location { + metro_code ="SV" + } + } + } +} +``` + +### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Fabric Cloud Router to Equinix Metal + +```terraform +resource "equinix_metal_vlan" "example1" { + project_id = local.my_project_id + metro = "SV" +} + +resource "equinix_metal_connection" "example" { + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] +} + +resource "equinix_fabric_connection" "example" { + name = "tf-NIMF-metal-2-aws-legacy" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = "sername@example.com" + } + project { + project_id = local.fabric_project_id + } + bandwidth = "200" + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "METAL_NETWORK" + authentication_key = equinix_metal_connection.metal-connection.authorization_code + } + } + z_side { + access_point { + type = "SP" + authentication_key = local.aws_account_id + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = data.equinix_fabric_service_profiles.zside[0].id + } + location { + metro_code ="SV" + } + } + } +} +``` + ## Argument Reference The following arguments are supported: @@ -155,3 +280,4 @@ In addition to all arguments above, the following attributes are exported: * `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`). Schema of port is described in documentation of the [equinix_metal_connection datasource](../data-sources/metal_connection.md). * `service_tokens` - List of connection service tokens with attributes required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). Scehma of service_token is described in documentation of the [equinix_metal_connection datasource](../data-sources/metal_connection.md). * `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. +* `authorization_code` - Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services). \ No newline at end of file From ee13ff1bb1d06086a29a3ec0643efb53e7a69829 Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Thu, 18 Jul 2024 15:06:25 -0700 Subject: [PATCH 2/4] docs: Adding NIMF doc updates to templates --- docs/resources/fabric_connection.md | 6 +- docs/resources/metal_connection.md | 59 +++++++++---------- .../resources/fabric_connection/example_16.tf | 32 ++++++++++ .../resources/fabric_connection/example_17.tf | 26 ++++++++ .../resources/metal_connection/example_4.tf | 59 +++++++++++++++++++ .../resources/metal_connection/example_5.tf | 51 ++++++++++++++++ .../data-sources/metal_connection.md.tmpl | 1 + templates/resources/fabric_connection.md.tmpl | 14 ++++- templates/resources/metal_connection.md.tmpl | 9 +++ 9 files changed, 219 insertions(+), 38 deletions(-) create mode 100644 examples/resources/fabric_connection/example_16.tf create mode 100644 examples/resources/fabric_connection/example_17.tf create mode 100644 examples/resources/metal_connection/example_4.tf create mode 100644 examples/resources/metal_connection/example_5.tf diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index bc5912444..26207d9c4 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -663,7 +663,7 @@ resource "equinix_fabric_connection" "epl" { } ``` -NIMF Metal to AWS EVPL_VC Connection +NIMF Metal to AWS EVPL_VC Connection: ```terraform resource "equinix_fabric_connection" "metal2aws" { @@ -700,7 +700,7 @@ resource "equinix_fabric_connection" "metal2aws" { } ``` -NIMF Fabric Cloud Router to Metal IP_VC Connection +NIMF Fabric Cloud Router to Metal IP_VC Connection: ```terraform resource "equinix_fabric_connection" "fcr2metal" { @@ -794,7 +794,7 @@ Optional: Optional: -- `authentication_key` (String) Authentication key for provider based or Metal NIMF connections +- `authentication_key` (String) Authentication key for provider based connections or Metal NIMF connections - `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--a_side--access_point--gateway)) - `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--a_side--access_point--interface)) - `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--a_side--access_point--link_protocol)) diff --git a/docs/resources/metal_connection.md b/docs/resources/metal_connection.md index 90a72b7c4..421469e91 100644 --- a/docs/resources/metal_connection.md +++ b/docs/resources/metal_connection.md @@ -132,23 +132,21 @@ resource "equinix_fabric_connection" "example" { ```terraform resource "equinix_metal_vlan" "example1" { - project_id = local.my_project_id - metro = "SV" + project_id = local.my_project_id + metro = "SV" } - resource "equinix_metal_connection" "example" { - name = "tf-port-to-metal-legacy" - project_id = local.my_project_id - metro = "SV" - redundancy = "redundant" - type = "shared" - contact_email = "username@example.com" - vlans = [ - equinix_metal_vlan.example1.vxlan, - equinix_metal_vlan.example2.vxlan - ] + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] } - data "equinix_fabric_service_profiles" "zside" { count = var.zside_ap_type == "SP" ? 1 : 0 filter { @@ -157,7 +155,6 @@ data "equinix_fabric_service_profiles" "zside" { values = ["AWS Direct Connect"] } } - resource "equinix_fabric_connection" "example" { name = "tf-NIMF-metal-2-aws-legacy" type = "EVPL_VC" @@ -166,7 +163,7 @@ resource "equinix_fabric_connection" "example" { emails = "sername@example.com" } project { - project_id = local.fabric_project_id + project_id = local.fabric_project_id } bandwidth = "200" order { @@ -199,23 +196,21 @@ resource "equinix_fabric_connection" "example" { ```terraform resource "equinix_metal_vlan" "example1" { - project_id = local.my_project_id - metro = "SV" + project_id = local.my_project_id + metro = "SV" } - resource "equinix_metal_connection" "example" { - name = "tf-port-to-metal-legacy" - project_id = local.my_project_id - metro = "SV" - redundancy = "redundant" - type = "shared" - contact_email = "username@example.com" - vlans = [ - equinix_metal_vlan.example1.vxlan, - equinix_metal_vlan.example2.vxlan - ] + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] } - resource "equinix_fabric_connection" "example" { name = "tf-NIMF-metal-2-aws-legacy" type = "EVPL_VC" @@ -224,7 +219,7 @@ resource "equinix_fabric_connection" "example" { emails = "sername@example.com" } project { - project_id = local.fabric_project_id + project_id = local.fabric_project_id } bandwidth = "200" order { @@ -280,4 +275,4 @@ In addition to all arguments above, the following attributes are exported: * `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`). Schema of port is described in documentation of the [equinix_metal_connection datasource](../data-sources/metal_connection.md). * `service_tokens` - List of connection service tokens with attributes required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). Scehma of service_token is described in documentation of the [equinix_metal_connection datasource](../data-sources/metal_connection.md). * `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. -* `authorization_code` - Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services). \ No newline at end of file +* `authorization_code` - Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services). diff --git a/examples/resources/fabric_connection/example_16.tf b/examples/resources/fabric_connection/example_16.tf new file mode 100644 index 000000000..608063ee9 --- /dev/null +++ b/examples/resources/fabric_connection/example_16.tf @@ -0,0 +1,32 @@ +resource "equinix_fabric_connection" "metal2aws" { + name = "ConnectionName" + type = "EVPLAN_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "METAL_NETWORK" + authentication_key = "" + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_17.tf b/examples/resources/fabric_connection/example_17.tf new file mode 100644 index 000000000..41f95f922 --- /dev/null +++ b/examples/resources/fabric_connection/example_17.tf @@ -0,0 +1,26 @@ +resource "equinix_fabric_connection" "fcr2metal" { + name = "ConnectionName" + type = "IP_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "CLOUD_ROUTER" + router { + uuid = "" + } + } + } + z_side { + access_point { + type = "METAL_NETWORK" + authentication_key = "" + } + } +} diff --git a/examples/resources/metal_connection/example_4.tf b/examples/resources/metal_connection/example_4.tf new file mode 100644 index 000000000..aa87ea1d8 --- /dev/null +++ b/examples/resources/metal_connection/example_4.tf @@ -0,0 +1,59 @@ +resource "equinix_metal_vlan" "example1" { + project_id = local.my_project_id + metro = "SV" +} +resource "equinix_metal_connection" "example" { + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] +} +data "equinix_fabric_service_profiles" "zside" { + count = var.zside_ap_type == "SP" ? 1 : 0 + filter { + property = "/name" + operator = "=" + values = ["AWS Direct Connect"] + } +} +resource "equinix_fabric_connection" "example" { + name = "tf-NIMF-metal-2-aws-legacy" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = "sername@example.com" + } + project { + project_id = local.fabric_project_id + } + bandwidth = "200" + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "METAL_NETWORK" + authentication_key = equinix_metal_connection.metal-connection.authorization_code + } + } + z_side { + access_point { + type = "SP" + authentication_key = local.aws_account_id + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = data.equinix_fabric_service_profiles.zside[0].id + } + location { + metro_code ="SV" + } + } + } +} diff --git a/examples/resources/metal_connection/example_5.tf b/examples/resources/metal_connection/example_5.tf new file mode 100644 index 000000000..651e7f184 --- /dev/null +++ b/examples/resources/metal_connection/example_5.tf @@ -0,0 +1,51 @@ +resource "equinix_metal_vlan" "example1" { + project_id = local.my_project_id + metro = "SV" +} +resource "equinix_metal_connection" "example" { + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] +} +resource "equinix_fabric_connection" "example" { + name = "tf-NIMF-metal-2-aws-legacy" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = "sername@example.com" + } + project { + project_id = local.fabric_project_id + } + bandwidth = "200" + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "METAL_NETWORK" + authentication_key = equinix_metal_connection.metal-connection.authorization_code + } + } + z_side { + access_point { + type = "SP" + authentication_key = local.aws_account_id + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = data.equinix_fabric_service_profiles.zside[0].id + } + location { + metro_code ="SV" + } + } + } +} diff --git a/templates/data-sources/metal_connection.md.tmpl b/templates/data-sources/metal_connection.md.tmpl index dfb946f73..35a41611d 100644 --- a/templates/data-sources/metal_connection.md.tmpl +++ b/templates/data-sources/metal_connection.md.tmpl @@ -56,3 +56,4 @@ In addition to all arguments above, the following attributes are exported: * `link_status` - Port link status. * `virtual_circuit_ids` - List of IDs of virtual cicruits attached to this port. * `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](../resources/fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. +* `authorization_code` - Fabric Authorization Code to configure the NIMF connection in Equinix Fabric with the [equinix_fabric_connection](../resources/fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index 0851bdb35..dd3a39042 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -86,6 +86,14 @@ EVPLAN Port to Network Connection: {{tffile "examples/resources/fabric_connection/example_15.tf"}} +NIMF Metal to AWS EVPL_VC Connection: + +{{tffile "examples/resources/fabric_connection/example_16.tf"}} + +NIMF Fabric Cloud Router to Metal IP_VC Connection: + +{{tffile "examples/resources/fabric_connection/example_17.tf"}} + ### Notes: Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: @@ -149,7 +157,7 @@ Optional: Optional: -- `authentication_key` (String) Authentication key for provider based connections +- `authentication_key` (String) Authentication key for provider based connections or Metal NIMF connections - `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--a_side--access_point--gateway)) - `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--a_side--access_point--interface)) - `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--a_side--access_point--link_protocol)) @@ -161,7 +169,7 @@ Optional: - `provider_connection_id` (String) Provider assigned Connection Id - `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--a_side--access_point--router)) - `seller_region` (String) Access point seller region -- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK +- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK - `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--a_side--access_point--virtual_device)) Read-Only: @@ -392,7 +400,7 @@ Optional: - `provider_connection_id` (String) Provider assigned Connection Id - `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--z_side--access_point--router)) - `seller_region` (String) Access point seller region -- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK +- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK - `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--z_side--access_point--virtual_device)) Read-Only: diff --git a/templates/resources/metal_connection.md.tmpl b/templates/resources/metal_connection.md.tmpl index 68adae632..ad5bb9f90 100644 --- a/templates/resources/metal_connection.md.tmpl +++ b/templates/resources/metal_connection.md.tmpl @@ -30,6 +30,14 @@ Use this resource to request the creation an Interconnection asset to connect wi {{tffile "examples/resources/metal_connection/example_3.tf"}} +### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Metal to a Cloud Service Provider via Equinix Fabric Port + +{{tffile "examples/resources/metal_connection/example_4.tf"}} + +### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Fabric Cloud Router to Equinix Metal + +{{tffile "examples/resources/metal_connection/example_5.tf"}} + ## Argument Reference The following arguments are supported: @@ -57,3 +65,4 @@ In addition to all arguments above, the following attributes are exported: * `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`). Schema of port is described in documentation of the [equinix_metal_connection datasource](../data-sources/metal_connection.md). * `service_tokens` - List of connection service tokens with attributes required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). Scehma of service_token is described in documentation of the [equinix_metal_connection datasource](../data-sources/metal_connection.md). * `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. +* `authorization_code` - Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services). From 029b474eafe0694bb2f254f3e00c3d5926ef6487 Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Fri, 19 Jul 2024 14:19:27 -0700 Subject: [PATCH 3/4] fix: Adding {{ .SchemaMarkdown | trimspace }} into doc templates and renaming doc example file names --- docs/data-sources/metal_connection.md | 57 +- docs/resources/fabric_connection.md | 125 ++-- docs/resources/metal_connection.md | 71 ++- .../{example_9.tf => fcr_to_azure.tf} | 0 .../{example_17.tf => fcr_to_metal.tf} | 0 .../{example_12.tf => fcr_to_network.tf} | 0 .../{example_8.tf => fcr_to_port.tf} | 0 .../{example_16.tf => metal_to_aws.tf} | 0 .../{example_2.tf => port_to_aws.tf} | 0 ...example_14.tf => port_to_network_eplan.tf} | 2 +- ...xample_15.tf => port_to_network_evplan.tf} | 2 +- .../{example_1.tf => port_to_port.tf} | 0 ...xample_4.tf => port_to_port_access_epl.tf} | 0 .../{example_3.tf => port_to_port_epl.tf} | 0 .../{example_5.tf => port_to_vd.tf} | 0 .../{example_7.tf => token_to_aws.tf} | 0 .../{example_10.tf => vd_to_azure.tf} | 0 ...example_11.tf => vd_to_azure_redundant.tf} | 0 .../{example_13.tf => vd_to_network.tf} | 2 +- .../{example_6.tf => vd_to_token.tf} | 0 .../{example_5.tf => shared_nimf_from_fcr.tf} | 0 .../{example_4.tf => shared_nimf_to_csp.tf} | 0 ....tf => shared_no_token_metal_to_fabric.tf} | 0 ...f => shared_token_fabric_port_to_metal.tf} | 0 ...mple_1.tf => shared_token_metal_to_csp.tf} | 0 .../fabric/connection/resource_schema.go | 4 +- .../metal/connection/datasource_schema.go | 2 +- .../metal/connection/resource_schema.go | 2 +- .../data-sources/metal_connection.md.tmpl | 2 +- templates/resources/fabric_connection.md.tmpl | 601 +----------------- templates/resources/metal_connection.md.tmpl | 24 +- 31 files changed, 205 insertions(+), 689 deletions(-) rename examples/resources/fabric_connection/{example_9.tf => fcr_to_azure.tf} (100%) rename examples/resources/fabric_connection/{example_17.tf => fcr_to_metal.tf} (100%) rename examples/resources/fabric_connection/{example_12.tf => fcr_to_network.tf} (100%) rename examples/resources/fabric_connection/{example_8.tf => fcr_to_port.tf} (100%) rename examples/resources/fabric_connection/{example_16.tf => metal_to_aws.tf} (100%) rename examples/resources/fabric_connection/{example_2.tf => port_to_aws.tf} (100%) rename examples/resources/fabric_connection/{example_14.tf => port_to_network_eplan.tf} (90%) rename examples/resources/fabric_connection/{example_15.tf => port_to_network_evplan.tf} (91%) rename examples/resources/fabric_connection/{example_1.tf => port_to_port.tf} (100%) rename examples/resources/fabric_connection/{example_4.tf => port_to_port_access_epl.tf} (100%) rename examples/resources/fabric_connection/{example_3.tf => port_to_port_epl.tf} (100%) rename examples/resources/fabric_connection/{example_5.tf => port_to_vd.tf} (100%) rename examples/resources/fabric_connection/{example_7.tf => token_to_aws.tf} (100%) rename examples/resources/fabric_connection/{example_10.tf => vd_to_azure.tf} (100%) rename examples/resources/fabric_connection/{example_11.tf => vd_to_azure_redundant.tf} (100%) rename examples/resources/fabric_connection/{example_13.tf => vd_to_network.tf} (91%) rename examples/resources/fabric_connection/{example_6.tf => vd_to_token.tf} (100%) rename examples/resources/metal_connection/{example_5.tf => shared_nimf_from_fcr.tf} (100%) rename examples/resources/metal_connection/{example_4.tf => shared_nimf_to_csp.tf} (100%) rename examples/resources/metal_connection/{example_3.tf => shared_no_token_metal_to_fabric.tf} (100%) rename examples/resources/metal_connection/{example_2.tf => shared_token_fabric_port_to_metal.tf} (100%) rename examples/resources/metal_connection/{example_1.tf => shared_token_metal_to_csp.tf} (100%) diff --git a/docs/data-sources/metal_connection.md b/docs/data-sources/metal_connection.md index c2c459a52..508229b49 100644 --- a/docs/data-sources/metal_connection.md +++ b/docs/data-sources/metal_connection.md @@ -20,7 +20,62 @@ data "equinix_metal_connection" "example" { The following arguments are supported: -* `connection_id` - (Required) ID of the connection resource. + +## Schema + +### Required + +- `connection_id` (String) ID of the connection to lookup + +### Read-Only + +- `authorization_code` (String) Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services). +- `contact_email` (String) The preferred email used for communication and notifications about the Equinix Fabric interconnection +- `description` (String) Description of the connection resource +- `facility` (String, Deprecated) Facility which the connection is scoped to +- `id` (String) The unique identifier of the resource +- `metro` (String) Metro which the connection is scoped to +- `mode` (String) Connection mode - standard or tunnel +- `name` (String) Name of the connection resource +- `organization_id` (String) ID of organization to which the connection is scoped to +- `ports` (List of Object) List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`) (see [below for nested schema](#nestedatt--ports)) +- `project_id` (String) ID of project to which the connection belongs +- `redundancy` (String) Connection redundancy - redundant or primary +- `service_token_type` (String) Only used with shared connection. Type of service token to use for the connection, a_side or z_side +- `service_tokens` (List of Object) Only used with shared connection. List of service tokens required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) (see [below for nested schema](#nestedatt--service_tokens)) +- `speed` (String) Connection speed - Values will be in the format 'Mbps' or 'Gpbs', for example '100Mbps`, '50Gbps', etc. +- `status` (String) Status of the connection resource +- `tags` (List of String) Tags attached to the connection +- `token` (String, Deprecated) Only used with shared connection. Fabric Token required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) +- `type` (String) Connection type - dedicated or shared +- `vlans` (List of Number) Attached vlans, only in shared connection +- `vrfs` (List of String) Attached vrfs, only in shared connection + + +### Nested Schema for `ports` + +Read-Only: + +- `id` (String) +- `link_status` (String) +- `name` (String) +- `role` (String) +- `speed` (Number) +- `status` (String) +- `virtual_circuit_ids` (List of String) + + + +### Nested Schema for `service_tokens` + +Read-Only: + +- `expires_at` (String) +- `id` (String) +- `max_allowed_speed` (String) +- `role` (String) +- `state` (String) +- `type` (String) ## Attributes Reference diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index 26207d9c4..2d6ede05e 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -557,7 +557,7 @@ resource "equinix_fabric_connection" "fcr2network"{ Virtual Device to Network Connection: ```terraform -resource "equinix_fabric_connection" "vd2token" { +resource "equinix_fabric_connection" "vd2network" { name = "ConnectionName" type = "EVPLAN_VC" notifications { @@ -595,7 +595,7 @@ resource "equinix_fabric_connection" "vd2token" { EPLAN Port to Network Connection: ```terraform -resource "equinix_fabric_connection" "epl" { +resource "equinix_fabric_connection" "eplan" { name = "ConnectionName" type = "EPLAN_VC" notifications { @@ -628,7 +628,7 @@ resource "equinix_fabric_connection" "epl" { EVPLAN Port to Network Connection: ```terraform -resource "equinix_fabric_connection" "epl" { +resource "equinix_fabric_connection" "evplan" { name = "ConnectionName" type = "EVPLAN_VC" notifications { @@ -745,7 +745,6 @@ To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_ga - Use action = "delete_gateway_approve" - ## Schema ### Required @@ -754,14 +753,14 @@ To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_ga - `bandwidth` (Number) Connection bandwidth in Mbps - `name` (String) Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores - `notifications` (Block List, Min: 1) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedblock--notifications)) -- `type` (String) Defines the connection type like EVPL_VC, EPL_VC, IPWAN_VC, IP_VC, ACCESS_EPL_VC, EVPLAN_VC, EPLAN_VC, EIA_VC, EC_VC +- `type` (String) Defines the connection type like EVPL_VC, EPL_VC, IPWAN_VC, IP_VC, ACCESS_EPL_VC, EVPLAN_VC, EPLAN_VC, EIA_VC, IA_VC, EC_VC - `z_side` (Block Set, Min: 1, Max: 1) Destination or Provider side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedblock--z_side)) ### Optional - `additional_info` (List of Map of String) Connection additional information - `description` (String) Customer-provided connection description -- `order` (Block Set, Min: 1, Max: 1) Order details (see [below for nested schema](#nestedblock--order)) +- `order` (Block Set, Max: 1) Order details (see [below for nested schema](#nestedblock--order)) - `project` (Block Set, Max: 1) Project information (see [below for nested schema](#nestedblock--project)) - `redundancy` (Block Set, Max: 1) Connection Redundancy Configuration (see [below for nested schema](#nestedblock--redundancy)) - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) @@ -779,7 +778,6 @@ To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_ga - `uuid` (String) Equinix-assigned connection identifier - ### Nested Schema for `a_side` Optional: @@ -789,7 +787,6 @@ Optional: - `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--a_side--service_token)) - ### Nested Schema for `a_side.access_point` Optional: @@ -803,7 +800,6 @@ Optional: - `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL - `port` (Block Set, Max: 1) Port access point information (see [below for nested schema](#nestedblock--a_side--access_point--port)) - `profile` (Block Set, Max: 1) Service Profile (see [below for nested schema](#nestedblock--a_side--access_point--profile)) -- `provider_connection_id` (String) Provider assigned Connection Id - `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--a_side--access_point--router)) - `seller_region` (String) Access point seller region - `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK @@ -812,9 +808,9 @@ Optional: Read-Only: - `account` (Block Set) Account (see [below for nested schema](#nestedblock--a_side--access_point--account)) +- `provider_connection_id` (String) Provider assigned Connection Id - ### Nested Schema for `a_side.access_point.gateway` Optional: @@ -825,8 +821,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.interface` Optional: @@ -835,8 +831,8 @@ Optional: - `type` (String) Interface type - `uuid` (String) Equinix-assigned interface identifier - + ### Nested Schema for `a_side.access_point.link_protocol` Optional: @@ -846,8 +842,8 @@ Optional: - `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections - `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections - + ### Nested Schema for `a_side.access_point.location` Optional: @@ -857,8 +853,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - + ### Nested Schema for `a_side.access_point.network` Optional: @@ -869,8 +865,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.port` Optional: @@ -884,7 +880,6 @@ Read-Only: - `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--a_side--access_point--port--redundancy)) - ### Nested Schema for `a_side.access_point.port.redundancy` Read-Only: @@ -893,13 +888,14 @@ Read-Only: - `group` (String) - `priority` (String) - + + ### Nested Schema for `a_side.access_point.profile` Required: -- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE +- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE, IA_PROFILE - `uuid` (String) Equinix assigned service profile identifier Read-Only: @@ -910,7 +906,6 @@ Read-Only: - `name` (String) Customer-assigned service profile name - ### Nested Schema for `a_side.access_point.profile.access_point_type_configs` Read-Only: @@ -918,8 +913,9 @@ Read-Only: - `type` (String) - `uuid` (String) - + + ### Nested Schema for `a_side.access_point.router` Optional: @@ -930,8 +926,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.virtual_device` Optional: @@ -944,8 +940,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.account` Read-Only: @@ -959,8 +955,9 @@ Read-Only: - `organization_name` (String) Equinix-assigned name of the subscriber's organization. - `ucm_id` (String) Enterprise datastore id - + + ### Nested Schema for `a_side.additional_info` Optional: @@ -968,8 +965,8 @@ Optional: - `key` (String) Additional information key - `value` (String) Additional information value - + ### Nested Schema for `a_side.service_token` Optional: @@ -982,8 +979,9 @@ Read-Only: - `description` (String) Service token description - `href` (String) An absolute URL that is the subject of the link's context - + + ### Nested Schema for `notifications` Required: @@ -995,22 +993,8 @@ Optional: - `send_interval` (String) Send interval - - -### Nested Schema for `order` - -Optional: - -- `purchase_order_number` (String) Purchase order number - -Read-Only: - -- `billing_tier` (String) Billing tier for connection bandwidth -- `order_id` (String) Order Identification -- `order_number` (String) Order Reference Number - ### Nested Schema for `z_side` Optional: @@ -1020,12 +1004,11 @@ Optional: - `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--z_side--service_token)) - ### Nested Schema for `z_side.access_point` Optional: -- `authentication_key` (String) Authentication key for provider based connections +- `authentication_key` (String) Authentication key for provider based connections or Metal NIMF connections - `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--z_side--access_point--gateway)) - `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--z_side--access_point--interface)) - `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--z_side--access_point--link_protocol)) @@ -1034,7 +1017,6 @@ Optional: - `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL - `port` (Block Set, Max: 1) Port access point information (see [below for nested schema](#nestedblock--z_side--access_point--port)) - `profile` (Block Set, Max: 1) Service Profile (see [below for nested schema](#nestedblock--z_side--access_point--profile)) -- `provider_connection_id` (String) Provider assigned Connection Id - `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--z_side--access_point--router)) - `seller_region` (String) Access point seller region - `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK @@ -1043,9 +1025,9 @@ Optional: Read-Only: - `account` (Block Set) Account (see [below for nested schema](#nestedblock--z_side--access_point--account)) +- `provider_connection_id` (String) Provider assigned Connection Id - ### Nested Schema for `z_side.access_point.gateway` Optional: @@ -1056,8 +1038,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.interface` Optional: @@ -1066,8 +1048,8 @@ Optional: - `type` (String) Interface type - `uuid` (String) Equinix-assigned interface identifier - + ### Nested Schema for `z_side.access_point.link_protocol` Optional: @@ -1077,8 +1059,8 @@ Optional: - `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections - `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections - + ### Nested Schema for `z_side.access_point.location` Optional: @@ -1088,8 +1070,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - + ### Nested Schema for `z_side.access_point.network` Optional: @@ -1100,8 +1082,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.port` Optional: @@ -1115,7 +1097,6 @@ Read-Only: - `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--z_side--access_point--port--redundancy)) - ### Nested Schema for `z_side.access_point.port.redundancy` Read-Only: @@ -1124,13 +1105,14 @@ Read-Only: - `group` (String) - `priority` (String) - + + ### Nested Schema for `z_side.access_point.profile` Required: -- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE +- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE, IA_PROFILE - `uuid` (String) Equinix assigned service profile identifier Read-Only: @@ -1141,7 +1123,6 @@ Read-Only: - `name` (String) Customer-assigned service profile name - ### Nested Schema for `z_side.access_point.profile.access_point_type_configs` Read-Only: @@ -1149,8 +1130,9 @@ Read-Only: - `type` (String) - `uuid` (String) - + + ### Nested Schema for `z_side.access_point.router` Optional: @@ -1161,8 +1143,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.virtual_device` Optional: @@ -1175,8 +1157,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.account` Read-Only: @@ -1190,8 +1172,9 @@ Read-Only: - `organization_name` (String) Equinix-assigned name of the subscriber's organization. - `ucm_id` (String) Enterprise datastore id - + + ### Nested Schema for `z_side.additional_info` Optional: @@ -1199,8 +1182,8 @@ Optional: - `key` (String) Additional information key - `value` (String) Additional information value - + ### Nested Schema for `z_side.service_token` Optional: @@ -1213,8 +1196,20 @@ Read-Only: - `description` (String) Service token description - `href` (String) An absolute URL that is the subject of the link's context - + + +### Nested Schema for `order` + +Optional: + +- `billing_tier` (String) Billing tier for connection bandwidth +- `order_id` (String) Order Identification +- `order_number` (String) Order Reference Number +- `purchase_order_number` (String) Purchase order number + + + ### Nested Schema for `project` Optional: @@ -1225,8 +1220,8 @@ Read-Only: - `href` (String) Unique Resource URL - + ### Nested Schema for `redundancy` Optional: @@ -1234,8 +1229,8 @@ Optional: - `group` (String) Redundancy group identifier (Use the redundancy.0.group UUID of primary connection; e.g. one(equinix_fabric_connection.primary_port_connection.redundancy).group or equinix_fabric_connection.primary_port_connection.redundancy.0.group) - `priority` (String) Connection priority in redundancy group - PRIMARY, SECONDARY - + ### Nested Schema for `timeouts` Optional: @@ -1245,8 +1240,8 @@ Optional: - `read` (String) - `update` (String) - + ### Nested Schema for `account` Read-Only: @@ -1260,8 +1255,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -1279,8 +1274,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `operation` Read-Only: @@ -1290,7 +1285,6 @@ Read-Only: - `provider_status` (String) - ### Nested Schema for `operation.errors` Read-Only: @@ -1303,10 +1297,9 @@ Read-Only: - `help` (String) - ### Nested Schema for `operation.errors.additional_info` Read-Only: - `property` (String) -- `reason` (String) +- `reason` (String) \ No newline at end of file diff --git a/docs/resources/metal_connection.md b/docs/resources/metal_connection.md index 421469e91..c6c1fc72d 100644 --- a/docs/resources/metal_connection.md +++ b/docs/resources/metal_connection.md @@ -252,19 +252,64 @@ resource "equinix_fabric_connection" "example" { The following arguments are supported: -* `name` - (Required) Name of the connection resource -* `metro` - (Optional) Metro where the connection will be created. -* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) -* `redundancy` - (Required) Connection redundancy - redundant or primary. -* `type` - (Required) Connection type - dedicated or shared. -* `contact_email` - (Optional) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. -* `project_id` - (Optional) ID of the project where the connection is scoped to, must be set for. -* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. -* `description` - (Optional) Description for the connection resource. -* `mode` - (Optional) Mode for connections in IBX facilities with the dedicated type - standard or tunnel. Default is standard. -* `tags` - (Optional) String list of tags. -* `vlans` - (Optional) Only used with shared connection. Vlans to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection. -* `service_token_type` - (Optional) Only used with shared connection. Type of service token to use for the connection, a_side or z_side. (**NOTE: To support the legacy non-automated way to create connections, terraform will not check if `service_token_type` is specified. If your organization already has `service_token_type` enabled, be sure to specify it or the connection will return a legacy connection token instead of a service token**) + +## Schema + +### Required + +- `name` (String) Name of the connection resource +- `redundancy` (String) Connection redundancy - redundant or primary +- `type` (String) Connection type - dedicated, shared or shared_port_vlan + +### Optional + +- `contact_email` (String) The preferred email used for communication and notifications about the Equinix Fabric interconnection +- `description` (String) Description of the connection resource +- `facility` (String, Deprecated) Facility where the connection will be created +- `metro` (String) Metro where the connection will be created +- `mode` (String) Mode for connections in IBX facilities with the dedicated type - standard or tunnel +- `organization_id` (String) ID of the organization responsible for the connection. Applicable with type "dedicated" +- `project_id` (String) ID of the project where the connection is scoped to. Required with type "shared" +- `service_token_type` (String) Only used with shared connection. Type of service token to use for the connection, a_side or z_side +- `speed` (String) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. +- `tags` (List of String) Tags attached to the connection +- `vlans` (List of Number) Only used with shared connection. VLANs to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection +- `vrfs` (List of String) Only used with shared connection. VRFs to attach. Pass one VRF for Primary/Single connection and two VRFs for Redundant connection + +### Read-Only + +- `authorization_code` (String) Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services) +- `id` (String) The unique identifier of the resource +- `ports` (List of Object) List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`) (see [below for nested schema](#nestedatt--ports)) +- `service_tokens` (List of Object) Only used with shared connection. List of service tokens required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) (see [below for nested schema](#nestedatt--service_tokens)) +- `status` (String) Status of the connection resource +- `token` (String, Deprecated) Only used with shared connection. Fabric Token required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) + + +### Nested Schema for `ports` + +Read-Only: + +- `id` (String) +- `link_status` (String) +- `name` (String) +- `role` (String) +- `speed` (Number) +- `status` (String) +- `virtual_circuit_ids` (List of String) + + + +### Nested Schema for `service_tokens` + +Read-Only: + +- `expires_at` (String) +- `id` (String) +- `max_allowed_speed` (String) +- `role` (String) +- `state` (String) +- `type` (String) ## Attributes Reference diff --git a/examples/resources/fabric_connection/example_9.tf b/examples/resources/fabric_connection/fcr_to_azure.tf similarity index 100% rename from examples/resources/fabric_connection/example_9.tf rename to examples/resources/fabric_connection/fcr_to_azure.tf diff --git a/examples/resources/fabric_connection/example_17.tf b/examples/resources/fabric_connection/fcr_to_metal.tf similarity index 100% rename from examples/resources/fabric_connection/example_17.tf rename to examples/resources/fabric_connection/fcr_to_metal.tf diff --git a/examples/resources/fabric_connection/example_12.tf b/examples/resources/fabric_connection/fcr_to_network.tf similarity index 100% rename from examples/resources/fabric_connection/example_12.tf rename to examples/resources/fabric_connection/fcr_to_network.tf diff --git a/examples/resources/fabric_connection/example_8.tf b/examples/resources/fabric_connection/fcr_to_port.tf similarity index 100% rename from examples/resources/fabric_connection/example_8.tf rename to examples/resources/fabric_connection/fcr_to_port.tf diff --git a/examples/resources/fabric_connection/example_16.tf b/examples/resources/fabric_connection/metal_to_aws.tf similarity index 100% rename from examples/resources/fabric_connection/example_16.tf rename to examples/resources/fabric_connection/metal_to_aws.tf diff --git a/examples/resources/fabric_connection/example_2.tf b/examples/resources/fabric_connection/port_to_aws.tf similarity index 100% rename from examples/resources/fabric_connection/example_2.tf rename to examples/resources/fabric_connection/port_to_aws.tf diff --git a/examples/resources/fabric_connection/example_14.tf b/examples/resources/fabric_connection/port_to_network_eplan.tf similarity index 90% rename from examples/resources/fabric_connection/example_14.tf rename to examples/resources/fabric_connection/port_to_network_eplan.tf index a61d1f424..a9db64b46 100644 --- a/examples/resources/fabric_connection/example_14.tf +++ b/examples/resources/fabric_connection/port_to_network_eplan.tf @@ -1,4 +1,4 @@ -resource "equinix_fabric_connection" "epl" { +resource "equinix_fabric_connection" "eplan" { name = "ConnectionName" type = "EPLAN_VC" notifications { diff --git a/examples/resources/fabric_connection/example_15.tf b/examples/resources/fabric_connection/port_to_network_evplan.tf similarity index 91% rename from examples/resources/fabric_connection/example_15.tf rename to examples/resources/fabric_connection/port_to_network_evplan.tf index 4b936b77c..8bc5f8f7a 100644 --- a/examples/resources/fabric_connection/example_15.tf +++ b/examples/resources/fabric_connection/port_to_network_evplan.tf @@ -1,4 +1,4 @@ -resource "equinix_fabric_connection" "epl" { +resource "equinix_fabric_connection" "evplan" { name = "ConnectionName" type = "EVPLAN_VC" notifications { diff --git a/examples/resources/fabric_connection/example_1.tf b/examples/resources/fabric_connection/port_to_port.tf similarity index 100% rename from examples/resources/fabric_connection/example_1.tf rename to examples/resources/fabric_connection/port_to_port.tf diff --git a/examples/resources/fabric_connection/example_4.tf b/examples/resources/fabric_connection/port_to_port_access_epl.tf similarity index 100% rename from examples/resources/fabric_connection/example_4.tf rename to examples/resources/fabric_connection/port_to_port_access_epl.tf diff --git a/examples/resources/fabric_connection/example_3.tf b/examples/resources/fabric_connection/port_to_port_epl.tf similarity index 100% rename from examples/resources/fabric_connection/example_3.tf rename to examples/resources/fabric_connection/port_to_port_epl.tf diff --git a/examples/resources/fabric_connection/example_5.tf b/examples/resources/fabric_connection/port_to_vd.tf similarity index 100% rename from examples/resources/fabric_connection/example_5.tf rename to examples/resources/fabric_connection/port_to_vd.tf diff --git a/examples/resources/fabric_connection/example_7.tf b/examples/resources/fabric_connection/token_to_aws.tf similarity index 100% rename from examples/resources/fabric_connection/example_7.tf rename to examples/resources/fabric_connection/token_to_aws.tf diff --git a/examples/resources/fabric_connection/example_10.tf b/examples/resources/fabric_connection/vd_to_azure.tf similarity index 100% rename from examples/resources/fabric_connection/example_10.tf rename to examples/resources/fabric_connection/vd_to_azure.tf diff --git a/examples/resources/fabric_connection/example_11.tf b/examples/resources/fabric_connection/vd_to_azure_redundant.tf similarity index 100% rename from examples/resources/fabric_connection/example_11.tf rename to examples/resources/fabric_connection/vd_to_azure_redundant.tf diff --git a/examples/resources/fabric_connection/example_13.tf b/examples/resources/fabric_connection/vd_to_network.tf similarity index 91% rename from examples/resources/fabric_connection/example_13.tf rename to examples/resources/fabric_connection/vd_to_network.tf index 6566ea611..d891c4460 100644 --- a/examples/resources/fabric_connection/example_13.tf +++ b/examples/resources/fabric_connection/vd_to_network.tf @@ -1,4 +1,4 @@ -resource "equinix_fabric_connection" "vd2token" { +resource "equinix_fabric_connection" "vd2network" { name = "ConnectionName" type = "EVPLAN_VC" notifications { diff --git a/examples/resources/fabric_connection/example_6.tf b/examples/resources/fabric_connection/vd_to_token.tf similarity index 100% rename from examples/resources/fabric_connection/example_6.tf rename to examples/resources/fabric_connection/vd_to_token.tf diff --git a/examples/resources/metal_connection/example_5.tf b/examples/resources/metal_connection/shared_nimf_from_fcr.tf similarity index 100% rename from examples/resources/metal_connection/example_5.tf rename to examples/resources/metal_connection/shared_nimf_from_fcr.tf diff --git a/examples/resources/metal_connection/example_4.tf b/examples/resources/metal_connection/shared_nimf_to_csp.tf similarity index 100% rename from examples/resources/metal_connection/example_4.tf rename to examples/resources/metal_connection/shared_nimf_to_csp.tf diff --git a/examples/resources/metal_connection/example_3.tf b/examples/resources/metal_connection/shared_no_token_metal_to_fabric.tf similarity index 100% rename from examples/resources/metal_connection/example_3.tf rename to examples/resources/metal_connection/shared_no_token_metal_to_fabric.tf diff --git a/examples/resources/metal_connection/example_2.tf b/examples/resources/metal_connection/shared_token_fabric_port_to_metal.tf similarity index 100% rename from examples/resources/metal_connection/example_2.tf rename to examples/resources/metal_connection/shared_token_fabric_port_to_metal.tf diff --git a/examples/resources/metal_connection/example_1.tf b/examples/resources/metal_connection/shared_token_metal_to_csp.tf similarity index 100% rename from examples/resources/metal_connection/example_1.tf rename to examples/resources/metal_connection/shared_token_metal_to_csp.tf diff --git a/internal/resources/fabric/connection/resource_schema.go b/internal/resources/fabric/connection/resource_schema.go index 0ce597d5a..fadbdeddc 100644 --- a/internal/resources/fabric/connection/resource_schema.go +++ b/internal/resources/fabric/connection/resource_schema.go @@ -213,7 +213,7 @@ func accessPointSch() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"COLO", "VD", "VG", "SP", "IGW", "SUBNET", "CLOUD_ROUTER", "NETWORK", "METAL_NETWORK"}, true), - Description: "Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK", + Description: "Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK", }, "account": { Type: schema.TypeSet, @@ -321,7 +321,7 @@ func accessPointSch() *schema.Resource { "authentication_key": { Type: schema.TypeString, Optional: true, - Description: "Authentication key for provider based connections", + Description: "Authentication key for provider based connections or Metal NIMF connections", }, "provider_connection_id": { Type: schema.TypeString, diff --git a/internal/resources/metal/connection/datasource_schema.go b/internal/resources/metal/connection/datasource_schema.go index e13e267dd..aff61c1a8 100644 --- a/internal/resources/metal/connection/datasource_schema.go +++ b/internal/resources/metal/connection/datasource_schema.go @@ -109,7 +109,7 @@ func dataSourceSchema(ctx context.Context) schema.Schema { Computed: true, }, "authorization_code": schema.StringAttribute{ - Description: "Only used with Fabric Shared connection. Fabric uses this token to be able to give more detailed information about the Metal end of the network, when viewing resources from within Fabric.", + Description: "Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services).", Computed: true, }, }, diff --git a/internal/resources/metal/connection/resource_schema.go b/internal/resources/metal/connection/resource_schema.go index 4e4dcd0ea..054ba5d0a 100644 --- a/internal/resources/metal/connection/resource_schema.go +++ b/internal/resources/metal/connection/resource_schema.go @@ -196,7 +196,7 @@ func resourceSchema(ctx context.Context) schema.Schema { }, }, "authorization_code": schema.StringAttribute{ - Description: "Only used with Fabric Shared connection. Fabric uses this token to be able to give more detailed information about the Metal end of the network, when viewing resources from within Fabric.", + Description: "Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services)", Computed: true, }, }, diff --git a/templates/data-sources/metal_connection.md.tmpl b/templates/data-sources/metal_connection.md.tmpl index 35a41611d..682e99a51 100644 --- a/templates/data-sources/metal_connection.md.tmpl +++ b/templates/data-sources/metal_connection.md.tmpl @@ -20,7 +20,7 @@ Use this data source to retrieve a [connection resource](https://metal.equinix.c The following arguments are supported: -* `connection_id` - (Required) ID of the connection resource. +{{ .SchemaMarkdown | trimspace }} ## Attributes Reference diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index dd3a39042..bd0f1014d 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -28,71 +28,71 @@ You can find those modules along with their usage examples on the [Terraform Reg Port to Port EVPL_VC Connection: -{{tffile "examples/resources/fabric_connection/example_1.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_port.tf"}} Port to AWS EVPL_VC Connection: -{{tffile "examples/resources/fabric_connection/example_2.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_aws.tf"}} Port to Port EPL Connection: -{{tffile "examples/resources/fabric_connection/example_3.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_port_epl.tf"}} Port to Port ACCESS_EPL_VC Connection: -{{tffile "examples/resources/fabric_connection/example_4.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_port_access_epl.tf"}} Virtual Device to Port Connection: -{{tffile "examples/resources/fabric_connection/example_5.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_vd.tf"}} Virtual Device to Service Token Connection: -{{tffile "examples/resources/fabric_connection/example_6.tf"}} +{{tffile "examples/resources/fabric_connection/vd_to_token.tf"}} Service Token to AWS Connection: -{{tffile "examples/resources/fabric_connection/example_7.tf"}} +{{tffile "examples/resources/fabric_connection/token_to_aws.tf"}} Cloud Router to Port Connection: -{{tffile "examples/resources/fabric_connection/example_8.tf"}} +{{tffile "examples/resources/fabric_connection/fcr_to_port.tf"}} Cloud Router to Azure Connection: -{{tffile "examples/resources/fabric_connection/example_9.tf"}} +{{tffile "examples/resources/fabric_connection/fcr_to_azure.tf"}} Virtual Device to Azure Connection: -{{tffile "examples/resources/fabric_connection/example_10.tf"}} +{{tffile "examples/resources/fabric_connection/vd_to_azure.tf"}} Virtual Device to Azure Redundant Connection: -{{tffile "examples/resources/fabric_connection/example_11.tf"}} +{{tffile "examples/resources/fabric_connection/vd_to_azure_redundant.tf"}} Cloud Router to Network Connection: -{{tffile "examples/resources/fabric_connection/example_12.tf"}} +{{tffile "examples/resources/fabric_connection/fcr_to_network.tf"}} Virtual Device to Network Connection: -{{tffile "examples/resources/fabric_connection/example_13.tf"}} +{{tffile "examples/resources/fabric_connection/vd_to_network.tf"}} EPLAN Port to Network Connection: -{{tffile "examples/resources/fabric_connection/example_14.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_network_eplan.tf"}} EVPLAN Port to Network Connection: -{{tffile "examples/resources/fabric_connection/example_15.tf"}} +{{tffile "examples/resources/fabric_connection/port_to_network_evplan.tf"}} NIMF Metal to AWS EVPL_VC Connection: -{{tffile "examples/resources/fabric_connection/example_16.tf"}} +{{tffile "examples/resources/fabric_connection/metal_to_aws.tf"}} NIMF Fabric Cloud Router to Metal IP_VC Connection: -{{tffile "examples/resources/fabric_connection/example_17.tf"}} +{{tffile "examples/resources/fabric_connection/fcr_to_metal.tf"}} ### Notes: @@ -107,569 +107,4 @@ To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_ga - Use action = "update_attributes_approve" For Connection Deletion: - Use action = "delete_gateway_approve" - - -## Schema - -### Required - -- `a_side` (Block Set, Min: 1, Max: 1) Requester or Customer side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedblock--a_side)) -- `bandwidth` (Number) Connection bandwidth in Mbps -- `name` (String) Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores -- `notifications` (Block List, Min: 1) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedblock--notifications)) -- `type` (String) Defines the connection type like EVPL_VC, EPL_VC, IPWAN_VC, IP_VC, ACCESS_EPL_VC, EVPLAN_VC, EPLAN_VC, EIA_VC, EC_VC -- `z_side` (Block Set, Min: 1, Max: 1) Destination or Provider side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedblock--z_side)) - -### Optional - -- `additional_info` (List of Map of String) Connection additional information -- `description` (String) Customer-provided connection description -- `order` (Block Set, Min: 1, Max: 1) Order details (see [below for nested schema](#nestedblock--order)) -- `project` (Block Set, Max: 1) Project information (see [below for nested schema](#nestedblock--project)) -- `redundancy` (Block Set, Max: 1) Connection Redundancy Configuration (see [below for nested schema](#nestedblock--redundancy)) -- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) - -### Read-Only - -- `account` (Set of Object) Customer account information that is associated with this connection (see [below for nested schema](#nestedatt--account)) -- `change_log` (Set of Object) Captures connection lifecycle change information (see [below for nested schema](#nestedatt--change_log)) -- `direction` (String) Connection directionality from the requester point of view -- `href` (String) Connection URI information -- `id` (String) The ID of this resource. -- `is_remote` (Boolean) Connection property derived from access point locations -- `operation` (Set of Object) Connection type-specific operational data (see [below for nested schema](#nestedatt--operation)) -- `state` (String) Connection overall state -- `uuid` (String) Equinix-assigned connection identifier - - - -### Nested Schema for `a_side` - -Optional: - -- `access_point` (Block Set, Max: 1) Point of access details (see [below for nested schema](#nestedblock--a_side--access_point)) -- `additional_info` (Block List) Connection side additional information (see [below for nested schema](#nestedblock--a_side--additional_info)) -- `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--a_side--service_token)) - - - -### Nested Schema for `a_side.access_point` - -Optional: - -- `authentication_key` (String) Authentication key for provider based connections or Metal NIMF connections -- `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--a_side--access_point--gateway)) -- `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--a_side--access_point--interface)) -- `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--a_side--access_point--link_protocol)) -- `location` (Block Set, Max: 1) Access point location (see [below for nested schema](#nestedblock--a_side--access_point--location)) -- `network` (Block Set, Max: 1) network access point information (see [below for nested schema](#nestedblock--a_side--access_point--network)) -- `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL -- `port` (Block Set, Max: 1) Port access point information (see [below for nested schema](#nestedblock--a_side--access_point--port)) -- `profile` (Block Set, Max: 1) Service Profile (see [below for nested schema](#nestedblock--a_side--access_point--profile)) -- `provider_connection_id` (String) Provider assigned Connection Id -- `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--a_side--access_point--router)) -- `seller_region` (String) Access point seller region -- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK -- `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--a_side--access_point--virtual_device)) - -Read-Only: - -- `account` (Block Set) Account (see [below for nested schema](#nestedblock--a_side--access_point--account)) - - - -### Nested Schema for `a_side.access_point.gateway` - -Optional: - -- `uuid` (String) Equinix-assigned virtual gateway identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `a_side.access_point.interface` - -Optional: - -- `id` (Number) id -- `type` (String) Interface type -- `uuid` (String) Equinix-assigned interface identifier - - - -### Nested Schema for `a_side.access_point.link_protocol` - -Optional: - -- `type` (String) Type of the link protocol - UNTAGGED, DOT1Q, QINQ, EVPN_VXLAN -- `vlan_c_tag` (Number) Vlan Customer Tag information, vlanCTag value specified for QINQ connections -- `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections -- `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections - - - -### Nested Schema for `a_side.access_point.location` - -Optional: - -- `ibx` (String) IBX Code -- `metro_code` (String) Access point metro code -- `metro_name` (String) Access point metro name -- `region` (String) Access point region - - - -### Nested Schema for `a_side.access_point.network` - -Optional: - -- `uuid` (String) Equinix-assigned Network identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `a_side.access_point.port` - -Optional: - -- `uuid` (String) Equinix-assigned Port identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier -- `name` (String) Port name -- `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--a_side--access_point--port--redundancy)) - - - -### Nested Schema for `a_side.access_point.port.redundancy` - -Read-Only: - -- `enabled` (Boolean) -- `group` (String) -- `priority` (String) - - - -### Nested Schema for `a_side.access_point.profile` - -Required: - -- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE -- `uuid` (String) Equinix assigned service profile identifier - -Read-Only: - -- `access_point_type_configs` (List of Object) Access point config information (see [below for nested schema](#nestedatt--a_side--access_point--profile--access_point_type_configs)) -- `description` (String) User-provided service description -- `href` (String) Service Profile URI response attribute -- `name` (String) Customer-assigned service profile name - - - -### Nested Schema for `a_side.access_point.profile.access_point_type_configs` - -Read-Only: - -- `type` (String) -- `uuid` (String) - - - -### Nested Schema for `a_side.access_point.router` - -Optional: - -- `uuid` (String) Equinix-assigned virtual gateway identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `a_side.access_point.virtual_device` - -Optional: - -- `name` (String) Customer-assigned Virtual Device Name -- `type` (String) Virtual Device type -- `uuid` (String) Equinix-assigned Virtual Device identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `a_side.access_point.account` - -Read-Only: - -- `account_name` (String) Legal name of the accountholder. -- `account_number` (Number) Equinix-assigned account number. -- `global_cust_id` (String) Equinix-assigned ID of the subscriber's parent organization. -- `global_org_id` (String) Equinix-assigned ID of the subscriber's parent organization. -- `global_organization_name` (String) Equinix-assigned name of the subscriber's parent organization. -- `org_id` (Number) Equinix-assigned ID of the subscriber's organization. -- `organization_name` (String) Equinix-assigned name of the subscriber's organization. -- `ucm_id` (String) Enterprise datastore id - - - -### Nested Schema for `a_side.additional_info` - -Optional: - -- `key` (String) Additional information key -- `value` (String) Additional information value - - - -### Nested Schema for `a_side.service_token` - -Optional: - -- `type` (String) Token type - VC_TOKEN -- `uuid` (String) Equinix-assigned service token identifier - -Read-Only: - -- `description` (String) Service token description -- `href` (String) An absolute URL that is the subject of the link's context - - - -### Nested Schema for `notifications` - -Required: - -- `emails` (List of String) Array of contact emails -- `type` (String) Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS - -Optional: - -- `send_interval` (String) Send interval - - - -### Nested Schema for `order` - -Optional: - -- `purchase_order_number` (String) Purchase order number - -Read-Only: - -- `billing_tier` (String) Billing tier for connection bandwidth -- `order_id` (String) Order Identification -- `order_number` (String) Order Reference Number - - - -### Nested Schema for `z_side` - -Optional: - -- `access_point` (Block Set, Max: 1) Point of access details (see [below for nested schema](#nestedblock--z_side--access_point)) -- `additional_info` (Block List) Connection side additional information (see [below for nested schema](#nestedblock--z_side--additional_info)) -- `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--z_side--service_token)) - - - -### Nested Schema for `z_side.access_point` - -Optional: - -- `authentication_key` (String) Authentication key for provider based connections -- `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--z_side--access_point--gateway)) -- `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--z_side--access_point--interface)) -- `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--z_side--access_point--link_protocol)) -- `location` (Block Set, Max: 1) Access point location (see [below for nested schema](#nestedblock--z_side--access_point--location)) -- `network` (Block Set, Max: 1) network access point information (see [below for nested schema](#nestedblock--z_side--access_point--network)) -- `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL -- `port` (Block Set, Max: 1) Port access point information (see [below for nested schema](#nestedblock--z_side--access_point--port)) -- `profile` (Block Set, Max: 1) Service Profile (see [below for nested schema](#nestedblock--z_side--access_point--profile)) -- `provider_connection_id` (String) Provider assigned Connection Id -- `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--z_side--access_point--router)) -- `seller_region` (String) Access point seller region -- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK, METAL_NETWORK -- `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--z_side--access_point--virtual_device)) - -Read-Only: - -- `account` (Block Set) Account (see [below for nested schema](#nestedblock--z_side--access_point--account)) - - - -### Nested Schema for `z_side.access_point.gateway` - -Optional: - -- `uuid` (String) Equinix-assigned virtual gateway identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `z_side.access_point.interface` - -Optional: - -- `id` (Number) id -- `type` (String) Interface type -- `uuid` (String) Equinix-assigned interface identifier - - - -### Nested Schema for `z_side.access_point.link_protocol` - -Optional: - -- `type` (String) Type of the link protocol - UNTAGGED, DOT1Q, QINQ, EVPN_VXLAN -- `vlan_c_tag` (Number) Vlan Customer Tag information, vlanCTag value specified for QINQ connections -- `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections -- `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections - - - -### Nested Schema for `z_side.access_point.location` - -Optional: - -- `ibx` (String) IBX Code -- `metro_code` (String) Access point metro code -- `metro_name` (String) Access point metro name -- `region` (String) Access point region - - - -### Nested Schema for `z_side.access_point.network` - -Optional: - -- `uuid` (String) Equinix-assigned Network identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `z_side.access_point.port` - -Optional: - -- `uuid` (String) Equinix-assigned Port identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier -- `name` (String) Port name -- `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--z_side--access_point--port--redundancy)) - - - -### Nested Schema for `z_side.access_point.port.redundancy` - -Read-Only: - -- `enabled` (Boolean) -- `group` (String) -- `priority` (String) - - - -### Nested Schema for `z_side.access_point.profile` - -Required: - -- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE -- `uuid` (String) Equinix assigned service profile identifier - -Read-Only: - -- `access_point_type_configs` (List of Object) Access point config information (see [below for nested schema](#nestedatt--z_side--access_point--profile--access_point_type_configs)) -- `description` (String) User-provided service description -- `href` (String) Service Profile URI response attribute -- `name` (String) Customer-assigned service profile name - - - -### Nested Schema for `z_side.access_point.profile.access_point_type_configs` - -Read-Only: - -- `type` (String) -- `uuid` (String) - - - -### Nested Schema for `z_side.access_point.router` - -Optional: - -- `uuid` (String) Equinix-assigned virtual gateway identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `z_side.access_point.virtual_device` - -Optional: - -- `name` (String) Customer-assigned Virtual Device Name -- `type` (String) Virtual Device type -- `uuid` (String) Equinix-assigned Virtual Device identifier - -Read-Only: - -- `href` (String) Unique Resource Identifier - - - -### Nested Schema for `z_side.access_point.account` - -Read-Only: - -- `account_name` (String) Legal name of the accountholder. -- `account_number` (Number) Equinix-assigned account number. -- `global_cust_id` (String) Equinix-assigned ID of the subscriber's parent organization. -- `global_org_id` (String) Equinix-assigned ID of the subscriber's parent organization. -- `global_organization_name` (String) Equinix-assigned name of the subscriber's parent organization. -- `org_id` (Number) Equinix-assigned ID of the subscriber's organization. -- `organization_name` (String) Equinix-assigned name of the subscriber's organization. -- `ucm_id` (String) Enterprise datastore id - - - -### Nested Schema for `z_side.additional_info` - -Optional: - -- `key` (String) Additional information key -- `value` (String) Additional information value - - - -### Nested Schema for `z_side.service_token` - -Optional: - -- `type` (String) Token type - VC_TOKEN -- `uuid` (String) Equinix-assigned service token identifier - -Read-Only: - -- `description` (String) Service token description -- `href` (String) An absolute URL that is the subject of the link's context - - - -### Nested Schema for `project` - -Optional: - -- `project_id` (String) Project Id - -Read-Only: - -- `href` (String) Unique Resource URL - - - -### Nested Schema for `redundancy` - -Optional: - -- `group` (String) Redundancy group identifier (Use the redundancy.0.group UUID of primary connection; e.g. one(equinix_fabric_connection.primary_port_connection.redundancy).group or equinix_fabric_connection.primary_port_connection.redundancy.0.group) -- `priority` (String) Connection priority in redundancy group - PRIMARY, SECONDARY - - - -### Nested Schema for `timeouts` - -Optional: - -- `create` (String) -- `delete` (String) -- `read` (String) -- `update` (String) - - - -### Nested Schema for `account` - -Read-Only: - -- `account_name` (String) -- `account_number` (Number) -- `global_cust_id` (String) -- `global_org_id` (String) -- `global_organization_name` (String) -- `org_id` (Number) -- `organization_name` (String) -- `ucm_id` (String) - - - -### Nested Schema for `change_log` - -Read-Only: - -- `created_by` (String) -- `created_by_email` (String) -- `created_by_full_name` (String) -- `created_date_time` (String) -- `deleted_by` (String) -- `deleted_by_email` (String) -- `deleted_by_full_name` (String) -- `deleted_date_time` (String) -- `updated_by` (String) -- `updated_by_email` (String) -- `updated_by_full_name` (String) -- `updated_date_time` (String) - - - -### Nested Schema for `operation` - -Read-Only: - -- `equinix_status` (String) -- `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) -- `provider_status` (String) - - - -### Nested Schema for `operation.errors` - -Read-Only: - -- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors--additional_info)) -- `correlation_id` (String) -- `details` (String) -- `error_code` (String) -- `error_message` (String) -- `help` (String) - - - -### Nested Schema for `operation.errors.additional_info` - -Read-Only: - -- `property` (String) -- `reason` (String) +{{ .SchemaMarkdown | trimspace }} \ No newline at end of file diff --git a/templates/resources/metal_connection.md.tmpl b/templates/resources/metal_connection.md.tmpl index ad5bb9f90..236f9fb59 100644 --- a/templates/resources/metal_connection.md.tmpl +++ b/templates/resources/metal_connection.md.tmpl @@ -16,45 +16,33 @@ Use this resource to request the creation an Interconnection asset to connect wi ### Shared Connection with a_side token - Redundant Connection from Equinix Metal to a Cloud Service Provider -{{tffile "examples/resources/metal_connection/example_1.tf"}} +{{tffile "examples/resources/metal_connection/shared_token_metal_to_csp.tf"}} -> NOTE: There are multiple [Equinix Fabric L2 Connection Terraform modules](https://registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection) available with full-fledged examples of connections from Fabric Ports, Network Edge Devices or Service Token to most popular Cloud Service Providers. Check out the examples for Equinix Metal shared connection with A-side Service Token included in each of them: [AWS](https://registry.terraform.io/modules/equinix-labs/fabric-connection-aws/equinix/latest/examples/service-token-metal-to-aws-connection), [Azure](https://registry.terraform.io/modules/equinix-labs/fabric-connection-azure/equinix/latest/examples/service-token-metal-to-azure-connection), [Google Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-gcp/equinix/latest/examples/service-token-metal-to-gcp-connection), [IBM Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-ibm/equinix/latest/examples/service-token-metal-to-ibm-connection), [Oracle Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-oci/equinix/latest/examples/service-token-metal-to-oci-connection), [Alibaba Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-alibaba/equinix/latest/examples/service-token-metal-to-alibaba-connection). ### Shared Connection with z_side token - Non-redundant Connection from your own Equinix Fabric Port to Equinix Metal -{{tffile "examples/resources/metal_connection/example_2.tf"}} +{{tffile "examples/resources/metal_connection/shared_token_fabric_port_to_metal.tf"}} -> NOTE: There is an [Equinix Fabric L2 Connection To Equinix Metal Terraform module](https://registry.terraform.io/modules/equinix-labs/fabric-connection-metal/equinix/latest) available with full-fledged examples of connections from Fabric Ports, Network Edge Devices or Service Tokens. Check out the [example for shared connection with Z-side Service Token](https://registry.terraform.io/modules/equinix-labs/fabric-connection-metal/equinix/0.2.0/examples/fabric-port-connection-with-zside-token). ### Shared Connection for organizations without Connection Services Token feature enabled -{{tffile "examples/resources/metal_connection/example_3.tf"}} +{{tffile "examples/resources/metal_connection/shared_no_token_metal_to_fabric.tf"}} ### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Metal to a Cloud Service Provider via Equinix Fabric Port -{{tffile "examples/resources/metal_connection/example_4.tf"}} +{{tffile "examples/resources/metal_connection/shared_nimf_to_csp.tf"}} ### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Fabric Cloud Router to Equinix Metal -{{tffile "examples/resources/metal_connection/example_5.tf"}} +{{tffile "examples/resources/metal_connection/shared_nimf_from_fcr.tf"}} ## Argument Reference The following arguments are supported: -* `name` - (Required) Name of the connection resource -* `metro` - (Optional) Metro where the connection will be created. -* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) -* `redundancy` - (Required) Connection redundancy - redundant or primary. -* `type` - (Required) Connection type - dedicated or shared. -* `contact_email` - (Optional) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. -* `project_id` - (Optional) ID of the project where the connection is scoped to, must be set for. -* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. -* `description` - (Optional) Description for the connection resource. -* `mode` - (Optional) Mode for connections in IBX facilities with the dedicated type - standard or tunnel. Default is standard. -* `tags` - (Optional) String list of tags. -* `vlans` - (Optional) Only used with shared connection. Vlans to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection. -* `service_token_type` - (Optional) Only used with shared connection. Type of service token to use for the connection, a_side or z_side. (**NOTE: To support the legacy non-automated way to create connections, terraform will not check if `service_token_type` is specified. If your organization already has `service_token_type` enabled, be sure to specify it or the connection will return a legacy connection token instead of a service token**) +{{ .SchemaMarkdown | trimspace }} ## Attributes Reference From 9dbafe64d58cda7da53f215e944263fadcf8a42b Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Mon, 22 Jul 2024 10:34:31 -0700 Subject: [PATCH 4/4] fix: reverting back changes for generating docs automatically using {{ .SchemaMarkdown }} --- docs/data-sources/metal_connection.md | 57 +-------------- docs/resources/metal_connection.md | 71 ++++--------------- .../metal/connection/datasource_schema.go | 2 +- .../metal/connection/resource_schema.go | 2 +- .../data-sources/metal_connection.md.tmpl | 2 +- templates/resources/metal_connection.md.tmpl | 14 +++- 6 files changed, 30 insertions(+), 118 deletions(-) diff --git a/docs/data-sources/metal_connection.md b/docs/data-sources/metal_connection.md index 508229b49..c2c459a52 100644 --- a/docs/data-sources/metal_connection.md +++ b/docs/data-sources/metal_connection.md @@ -20,62 +20,7 @@ data "equinix_metal_connection" "example" { The following arguments are supported: - -## Schema - -### Required - -- `connection_id` (String) ID of the connection to lookup - -### Read-Only - -- `authorization_code` (String) Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services). -- `contact_email` (String) The preferred email used for communication and notifications about the Equinix Fabric interconnection -- `description` (String) Description of the connection resource -- `facility` (String, Deprecated) Facility which the connection is scoped to -- `id` (String) The unique identifier of the resource -- `metro` (String) Metro which the connection is scoped to -- `mode` (String) Connection mode - standard or tunnel -- `name` (String) Name of the connection resource -- `organization_id` (String) ID of organization to which the connection is scoped to -- `ports` (List of Object) List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`) (see [below for nested schema](#nestedatt--ports)) -- `project_id` (String) ID of project to which the connection belongs -- `redundancy` (String) Connection redundancy - redundant or primary -- `service_token_type` (String) Only used with shared connection. Type of service token to use for the connection, a_side or z_side -- `service_tokens` (List of Object) Only used with shared connection. List of service tokens required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) (see [below for nested schema](#nestedatt--service_tokens)) -- `speed` (String) Connection speed - Values will be in the format 'Mbps' or 'Gpbs', for example '100Mbps`, '50Gbps', etc. -- `status` (String) Status of the connection resource -- `tags` (List of String) Tags attached to the connection -- `token` (String, Deprecated) Only used with shared connection. Fabric Token required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) -- `type` (String) Connection type - dedicated or shared -- `vlans` (List of Number) Attached vlans, only in shared connection -- `vrfs` (List of String) Attached vrfs, only in shared connection - - -### Nested Schema for `ports` - -Read-Only: - -- `id` (String) -- `link_status` (String) -- `name` (String) -- `role` (String) -- `speed` (Number) -- `status` (String) -- `virtual_circuit_ids` (List of String) - - - -### Nested Schema for `service_tokens` - -Read-Only: - -- `expires_at` (String) -- `id` (String) -- `max_allowed_speed` (String) -- `role` (String) -- `state` (String) -- `type` (String) +* `connection_id` - (Required) ID of the connection resource. ## Attributes Reference diff --git a/docs/resources/metal_connection.md b/docs/resources/metal_connection.md index c6c1fc72d..421469e91 100644 --- a/docs/resources/metal_connection.md +++ b/docs/resources/metal_connection.md @@ -252,64 +252,19 @@ resource "equinix_fabric_connection" "example" { The following arguments are supported: - -## Schema - -### Required - -- `name` (String) Name of the connection resource -- `redundancy` (String) Connection redundancy - redundant or primary -- `type` (String) Connection type - dedicated, shared or shared_port_vlan - -### Optional - -- `contact_email` (String) The preferred email used for communication and notifications about the Equinix Fabric interconnection -- `description` (String) Description of the connection resource -- `facility` (String, Deprecated) Facility where the connection will be created -- `metro` (String) Metro where the connection will be created -- `mode` (String) Mode for connections in IBX facilities with the dedicated type - standard or tunnel -- `organization_id` (String) ID of the organization responsible for the connection. Applicable with type "dedicated" -- `project_id` (String) ID of the project where the connection is scoped to. Required with type "shared" -- `service_token_type` (String) Only used with shared connection. Type of service token to use for the connection, a_side or z_side -- `speed` (String) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. -- `tags` (List of String) Tags attached to the connection -- `vlans` (List of Number) Only used with shared connection. VLANs to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection -- `vrfs` (List of String) Only used with shared connection. VRFs to attach. Pass one VRF for Primary/Single connection and two VRFs for Redundant connection - -### Read-Only - -- `authorization_code` (String) Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services) -- `id` (String) The unique identifier of the resource -- `ports` (List of Object) List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`) (see [below for nested schema](#nestedatt--ports)) -- `service_tokens` (List of Object) Only used with shared connection. List of service tokens required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) (see [below for nested schema](#nestedatt--service_tokens)) -- `status` (String) Status of the connection resource -- `token` (String, Deprecated) Only used with shared connection. Fabric Token required to continue the setup process with [equinix_fabric_connection](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard) - - -### Nested Schema for `ports` - -Read-Only: - -- `id` (String) -- `link_status` (String) -- `name` (String) -- `role` (String) -- `speed` (Number) -- `status` (String) -- `virtual_circuit_ids` (List of String) - - - -### Nested Schema for `service_tokens` - -Read-Only: - -- `expires_at` (String) -- `id` (String) -- `max_allowed_speed` (String) -- `role` (String) -- `state` (String) -- `type` (String) +* `name` - (Required) Name of the connection resource +* `metro` - (Optional) Metro where the connection will be created. +* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `redundancy` - (Required) Connection redundancy - redundant or primary. +* `type` - (Required) Connection type - dedicated or shared. +* `contact_email` - (Optional) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. +* `project_id` - (Optional) ID of the project where the connection is scoped to, must be set for. +* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. +* `description` - (Optional) Description for the connection resource. +* `mode` - (Optional) Mode for connections in IBX facilities with the dedicated type - standard or tunnel. Default is standard. +* `tags` - (Optional) String list of tags. +* `vlans` - (Optional) Only used with shared connection. Vlans to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection. +* `service_token_type` - (Optional) Only used with shared connection. Type of service token to use for the connection, a_side or z_side. (**NOTE: To support the legacy non-automated way to create connections, terraform will not check if `service_token_type` is specified. If your organization already has `service_token_type` enabled, be sure to specify it or the connection will return a legacy connection token instead of a service token**) ## Attributes Reference diff --git a/internal/resources/metal/connection/datasource_schema.go b/internal/resources/metal/connection/datasource_schema.go index aff61c1a8..e13e267dd 100644 --- a/internal/resources/metal/connection/datasource_schema.go +++ b/internal/resources/metal/connection/datasource_schema.go @@ -109,7 +109,7 @@ func dataSourceSchema(ctx context.Context) schema.Schema { Computed: true, }, "authorization_code": schema.StringAttribute{ - Description: "Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services).", + Description: "Only used with Fabric Shared connection. Fabric uses this token to be able to give more detailed information about the Metal end of the network, when viewing resources from within Fabric.", Computed: true, }, }, diff --git a/internal/resources/metal/connection/resource_schema.go b/internal/resources/metal/connection/resource_schema.go index 054ba5d0a..4e4dcd0ea 100644 --- a/internal/resources/metal/connection/resource_schema.go +++ b/internal/resources/metal/connection/resource_schema.go @@ -196,7 +196,7 @@ func resourceSchema(ctx context.Context) schema.Schema { }, }, "authorization_code": schema.StringAttribute{ - Description: "Fabric Authorization code to configure the NIMF connection with Cloud Service Provider through Equinix Fabric with the [equinix_fabric_connection](./fabric_connection.md) resource from the [Equinix Developer Portal](https://developer.equinix.com/dev-docs/fabric/getting-started/fabric-v4-apis/connect-metal-to-amazon-web-services)", + Description: "Only used with Fabric Shared connection. Fabric uses this token to be able to give more detailed information about the Metal end of the network, when viewing resources from within Fabric.", Computed: true, }, }, diff --git a/templates/data-sources/metal_connection.md.tmpl b/templates/data-sources/metal_connection.md.tmpl index 682e99a51..35a41611d 100644 --- a/templates/data-sources/metal_connection.md.tmpl +++ b/templates/data-sources/metal_connection.md.tmpl @@ -20,7 +20,7 @@ Use this data source to retrieve a [connection resource](https://metal.equinix.c The following arguments are supported: -{{ .SchemaMarkdown | trimspace }} +* `connection_id` - (Required) ID of the connection resource. ## Attributes Reference diff --git a/templates/resources/metal_connection.md.tmpl b/templates/resources/metal_connection.md.tmpl index 236f9fb59..c4fb9829c 100644 --- a/templates/resources/metal_connection.md.tmpl +++ b/templates/resources/metal_connection.md.tmpl @@ -42,7 +42,19 @@ Use this resource to request the creation an Interconnection asset to connect wi The following arguments are supported: -{{ .SchemaMarkdown | trimspace }} +* `name` - (Required) Name of the connection resource +* `metro` - (Optional) Metro where the connection will be created. +* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `redundancy` - (Required) Connection redundancy - redundant or primary. +* `type` - (Required) Connection type - dedicated or shared. +* `contact_email` - (Optional) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. +* `project_id` - (Optional) ID of the project where the connection is scoped to, must be set for. +* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. +* `description` - (Optional) Description for the connection resource. +* `mode` - (Optional) Mode for connections in IBX facilities with the dedicated type - standard or tunnel. Default is standard. +* `tags` - (Optional) String list of tags. +* `vlans` - (Optional) Only used with shared connection. Vlans to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection. +* `service_token_type` - (Optional) Only used with shared connection. Type of service token to use for the connection, a_side or z_side. (**NOTE: To support the legacy non-automated way to create connections, terraform will not check if `service_token_type` is specified. If your organization already has `service_token_type` enabled, be sure to specify it or the connection will return a legacy connection token instead of a service token**) ## Attributes Reference