From 1f2f6cd3057999cd8e8ea74559b94189520a1a7d Mon Sep 17 00:00:00 2001 From: d-bhola Date: Fri, 22 Nov 2024 08:05:30 -0800 Subject: [PATCH 1/6] CXF-99867: Add fabric connection resource and docs --- docs/resources/fabric_connection.md | 83 +++++++++++++++++++ .../port_to_alibaba.tf | 39 +++++++++ templates/resources/fabric_connection.md.tmpl | 43 ++++++++++ 3 files changed, 165 insertions(+) create mode 100644 examples/resources/equinix_fabric_connection/port_to_alibaba.tf diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index 2fbdb3bcc..851f783ca 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -731,6 +731,89 @@ resource "equinix_fabric_connection" "fcr2metal" { } ``` +Port to Alibaba Connection EVPL_VC Connection: + +```terraform +resource "equinix_fabric_connection" "port2alibaba" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + redundancy { priority = "PRIMARY" } + order { + purchase_order_number = "1-323929" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "DOT1Q" + vlan_tag = "2019" + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} +``` + +### Step by Step Instructions for Fabric Port to Fabric Alibaba Profile Connection + +#### 1. Create Connection from Equinix Terraform Provider + +**Note:** The `connection_name` must follow either one of these patterns: + +* A unique `connection_name` with atmost 24 characters +`connection_name = var.connection_name` +* A `connection_name` with atmost 12 characters combined with a random string of 12 characters: + `connection_name = "${var.connection_name}${random_string.random.result}"` + Use the `random_string` resource to perform this operation: + ```hcl + resource "random_string" "random" { + length = 12 + special = false + } + ``` + * A unique `connection_name` is generated by appending a 12-character random string to the variable name given by the user + * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal + * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal + +#### 2. Formulate main.tf and output.tf Files +* When you run the initial `terraform apply`, the resources and data sources (from the example) are in comments +* The comments can be removed after you accept the connection with the Alibaba portal + +#### 3. Accept the Connection Request +* Manually accept the connection request in the Alibaba Portal for the created physical connection + +#### 4. Create the Virtual Border Router (VBR) Resource +* Add resources and data sources to the connection example for creating the VBR resource +* Run `terraform init` to initialize and `terraform apply` to deploy the configuration +* The VBR resource is created successfully and linked to the physical connection + +#### 5. Delete Resources +* Run `terraform destroy` to delete the Alibaba VBR +* Directly deleting the Equinix Fabric connection, will result in the following error: `ERR-UAA-003-00: Deletion for a provisioned connection needs to be initiated from Alibaba Portal` +* Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection +* This action will automatically delete the connection on the Equinix side, updating its status to Deprovisioned on both Equinix and Provider side + ### Notes: Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: diff --git a/examples/resources/equinix_fabric_connection/port_to_alibaba.tf b/examples/resources/equinix_fabric_connection/port_to_alibaba.tf new file mode 100644 index 000000000..9aa3835e5 --- /dev/null +++ b/examples/resources/equinix_fabric_connection/port_to_alibaba.tf @@ -0,0 +1,39 @@ +resource "equinix_fabric_connection" "port2alibaba" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + redundancy { priority = "PRIMARY" } + order { + purchase_order_number = "1-323929" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "DOT1Q" + vlan_tag = "2019" + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} \ No newline at end of file diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index b4415a607..3aa17ec8e 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -94,6 +94,49 @@ EVPLAN Port to Network Connection: {{tffile "examples/resources/equinix_fabric_connection/fcr_to_metal.tf"}} +Port to Alibaba Connection EVPL_VC Connection: + +{{tffile "examples/resources/equinix_fabric_connection/port_to_alibaba.tf"}} + +### Step by Step Instructions for Fabric Port to Fabric Alibaba Profile Connection + +#### 1. Create Connection from Equinix Terraform Provider + +**Note:** The `connection_name` must follow either one of these patterns: + +* A unique `connection_name` with atmost 24 characters +`connection_name = var.connection_name` +* A `connection_name` with atmost 12 characters combined with a random string of 12 characters: + `connection_name = "${var.connection_name}${random_string.random.result}"` + Use the `random_string` resource to perform this operation: + ```hcl + resource "random_string" "random" { + length = 12 + special = false + } + ``` + * A unique `connection_name` is generated by appending a 12-character random string to the variable name given by the user + * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal + * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal + +#### 2. Formulate main.tf and output.tf Files +* When you run the initial `terraform apply`, the resources and data sources (from the example) are in comments +* The comments can be removed after you accept the connection with the Alibaba portal + +#### 3. Accept the Connection Request +* Manually accept the connection request in the Alibaba Portal for the created physical connection + +#### 4. Create the Virtual Border Router (VBR) Resource +* Add resources and data sources to the connection example for creating the VBR resource +* Run `terraform init` to initialize and `terraform apply` to deploy the configuration +* The VBR resource is created successfully and linked to the physical connection + +#### 5. Delete Resources +* Run `terraform destroy` to delete the Alibaba VBR +* Directly deleting the Equinix Fabric connection, will result in the following error: `ERR-UAA-003-00: Deletion for a provisioned connection needs to be initiated from Alibaba Portal` +* Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection +* This action will automatically delete the connection on the Equinix side, updating its status to Deprovisioned on both Equinix and Provider side + ### Notes: Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: From b5098c7178af77f9fb221daca2ecc12c1aba2e6d Mon Sep 17 00:00:00 2001 From: d-bhola Date: Fri, 22 Nov 2024 14:49:55 -0800 Subject: [PATCH 2/6] CXF-99867: Address PR comments and make docs --- docs/resources/fabric_connection.md | 78 +++++++++---------- templates/resources/fabric_connection.md.tmpl | 6 +- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index 851f783ca..c6397d042 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -733,6 +733,45 @@ resource "equinix_fabric_connection" "fcr2metal" { Port to Alibaba Connection EVPL_VC Connection: +### Step by Step Instructions for the Fabric Port to Fabric Alibaba Profile Connection Example Given Below + +#### 1. Create Connection from Equinix Terraform Provider + +**Note:** The `connection_name` must follow either one of these patterns: + +* A unique `connection_name` with atmost 24 characters +`connection_name = var.connection_name` +* A `connection_name` with atmost 12 characters combined with a random string of 12 characters: + `connection_name = "${var.connection_name}${random_string.random.result}"` + Use the `random_string` resource to perform this operation: + ```hcl + resource "random_string" "random" { + length = 12 + special = false + } + ``` + * A unique `connection_name` is generated by appending a 12-character random string to the variable name given by the user + * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal + * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal + +#### 2. Formulate main.tf and output.tf Files +* When you run the initial `terraform apply`, the resources and data sources (from the example) are in comments +* The comments can be removed after you accept the connection with the Alibaba portal + +#### 3. Accept the Connection Request +* Manually accept the connection request in the Alibaba Portal for the created physical connection + +#### 4. Create the Virtual Border Router (VBR) Resource +* Add resources and data sources to the connection example for creating the VBR resource +* Run `terraform init` to initialize and `terraform apply` to deploy the configuration +* The VBR resource is created successfully and linked to the physical connection + +#### 5. Delete Resources +* Run `terraform destroy` to delete the Alibaba VBR +* Directly deleting the Equinix Fabric connection, will result in the following error: `ERR-UAA-003-00: Deletion for a provisioned connection needs to be initiated from Alibaba Portal` +* Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection +* This action will automatically delete the connection on the Equinix side, updating its status to Deprovisioned on both Equinix and Provider side + ```terraform resource "equinix_fabric_connection" "port2alibaba" { name = "ConnectionName" @@ -775,45 +814,6 @@ resource "equinix_fabric_connection" "port2alibaba" { } ``` -### Step by Step Instructions for Fabric Port to Fabric Alibaba Profile Connection - -#### 1. Create Connection from Equinix Terraform Provider - -**Note:** The `connection_name` must follow either one of these patterns: - -* A unique `connection_name` with atmost 24 characters -`connection_name = var.connection_name` -* A `connection_name` with atmost 12 characters combined with a random string of 12 characters: - `connection_name = "${var.connection_name}${random_string.random.result}"` - Use the `random_string` resource to perform this operation: - ```hcl - resource "random_string" "random" { - length = 12 - special = false - } - ``` - * A unique `connection_name` is generated by appending a 12-character random string to the variable name given by the user - * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal - * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal - -#### 2. Formulate main.tf and output.tf Files -* When you run the initial `terraform apply`, the resources and data sources (from the example) are in comments -* The comments can be removed after you accept the connection with the Alibaba portal - -#### 3. Accept the Connection Request -* Manually accept the connection request in the Alibaba Portal for the created physical connection - -#### 4. Create the Virtual Border Router (VBR) Resource -* Add resources and data sources to the connection example for creating the VBR resource -* Run `terraform init` to initialize and `terraform apply` to deploy the configuration -* The VBR resource is created successfully and linked to the physical connection - -#### 5. Delete Resources -* Run `terraform destroy` to delete the Alibaba VBR -* Directly deleting the Equinix Fabric connection, will result in the following error: `ERR-UAA-003-00: Deletion for a provisioned connection needs to be initiated from Alibaba Portal` -* Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection -* This action will automatically delete the connection on the Equinix side, updating its status to Deprovisioned on both Equinix and Provider side - ### Notes: Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index 3aa17ec8e..30a95d5fe 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -96,9 +96,7 @@ EVPLAN Port to Network Connection: Port to Alibaba Connection EVPL_VC Connection: -{{tffile "examples/resources/equinix_fabric_connection/port_to_alibaba.tf"}} - -### Step by Step Instructions for Fabric Port to Fabric Alibaba Profile Connection +### Step by Step Instructions for the Fabric Port to Fabric Alibaba Profile Connection Example Given Below #### 1. Create Connection from Equinix Terraform Provider @@ -137,6 +135,8 @@ Port to Alibaba Connection EVPL_VC Connection: * Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection * This action will automatically delete the connection on the Equinix side, updating its status to Deprovisioned on both Equinix and Provider side +{{tffile "examples/resources/equinix_fabric_connection/port_to_alibaba.tf"}} + ### Notes: Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: From 49536f7e4c3ccc4a0ce06f54075fe5fe48fc8dcd Mon Sep 17 00:00:00 2001 From: d-bhola Date: Fri, 22 Nov 2024 16:10:54 -0800 Subject: [PATCH 3/6] CXF-99867: Change steps and make docs --- docs/resources/fabric_connection.md | 18 ++++-------------- .../port_to_alibaba.tf | 2 +- templates/resources/fabric_connection.md.tmpl | 18 ++++-------------- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index c6397d042..edb1c7624 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -735,7 +735,9 @@ Port to Alibaba Connection EVPL_VC Connection: ### Step by Step Instructions for the Fabric Port to Fabric Alibaba Profile Connection Example Given Below -#### 1. Create Connection from Equinix Terraform Provider +#### 1. Create and Accept the Connection + +Create the connection using the Equinix Terraform provider. Then manually accept the connection request in the Alibaba Portal for the created physical connection. **Note:** The `connection_name` must follow either one of these patterns: @@ -754,19 +756,7 @@ Port to Alibaba Connection EVPL_VC Connection: * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal -#### 2. Formulate main.tf and output.tf Files -* When you run the initial `terraform apply`, the resources and data sources (from the example) are in comments -* The comments can be removed after you accept the connection with the Alibaba portal - -#### 3. Accept the Connection Request -* Manually accept the connection request in the Alibaba Portal for the created physical connection - -#### 4. Create the Virtual Border Router (VBR) Resource -* Add resources and data sources to the connection example for creating the VBR resource -* Run `terraform init` to initialize and `terraform apply` to deploy the configuration -* The VBR resource is created successfully and linked to the physical connection - -#### 5. Delete Resources +#### 2. Delete Resources * Run `terraform destroy` to delete the Alibaba VBR * Directly deleting the Equinix Fabric connection, will result in the following error: `ERR-UAA-003-00: Deletion for a provisioned connection needs to be initiated from Alibaba Portal` * Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection diff --git a/examples/resources/equinix_fabric_connection/port_to_alibaba.tf b/examples/resources/equinix_fabric_connection/port_to_alibaba.tf index 9aa3835e5..fefdab9b2 100644 --- a/examples/resources/equinix_fabric_connection/port_to_alibaba.tf +++ b/examples/resources/equinix_fabric_connection/port_to_alibaba.tf @@ -36,4 +36,4 @@ resource "equinix_fabric_connection" "port2alibaba" { } } } -} \ No newline at end of file +} diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index 30a95d5fe..9de3573ff 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -98,7 +98,9 @@ Port to Alibaba Connection EVPL_VC Connection: ### Step by Step Instructions for the Fabric Port to Fabric Alibaba Profile Connection Example Given Below -#### 1. Create Connection from Equinix Terraform Provider +#### 1. Create and Accept the Connection + +Create the connection using the Equinix Terraform provider. Then manually accept the connection request in the Alibaba Portal for the created physical connection. **Note:** The `connection_name` must follow either one of these patterns: @@ -117,19 +119,7 @@ Port to Alibaba Connection EVPL_VC Connection: * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal -#### 2. Formulate main.tf and output.tf Files -* When you run the initial `terraform apply`, the resources and data sources (from the example) are in comments -* The comments can be removed after you accept the connection with the Alibaba portal - -#### 3. Accept the Connection Request -* Manually accept the connection request in the Alibaba Portal for the created physical connection - -#### 4. Create the Virtual Border Router (VBR) Resource -* Add resources and data sources to the connection example for creating the VBR resource -* Run `terraform init` to initialize and `terraform apply` to deploy the configuration -* The VBR resource is created successfully and linked to the physical connection - -#### 5. Delete Resources +#### 2. Delete Resources * Run `terraform destroy` to delete the Alibaba VBR * Directly deleting the Equinix Fabric connection, will result in the following error: `ERR-UAA-003-00: Deletion for a provisioned connection needs to be initiated from Alibaba Portal` * Go to the Alibaba Portal to manually **terminate** and then **delete** the physical connection From 5ed8be890b2105f778749e4fca548346a8adce28 Mon Sep 17 00:00:00 2001 From: d-bhola Date: Fri, 22 Nov 2024 17:13:24 -0800 Subject: [PATCH 4/6] CXF-99867: Address comments and make docs --- docs/resources/fabric_connection.md | 20 ++----------------- templates/resources/fabric_connection.md.tmpl | 20 ++----------------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index edb1c7624..b288ef03d 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -737,24 +737,8 @@ Port to Alibaba Connection EVPL_VC Connection: #### 1. Create and Accept the Connection -Create the connection using the Equinix Terraform provider. Then manually accept the connection request in the Alibaba Portal for the created physical connection. - -**Note:** The `connection_name` must follow either one of these patterns: - -* A unique `connection_name` with atmost 24 characters -`connection_name = var.connection_name` -* A `connection_name` with atmost 12 characters combined with a random string of 12 characters: - `connection_name = "${var.connection_name}${random_string.random.result}"` - Use the `random_string` resource to perform this operation: - ```hcl - resource "random_string" "random" { - length = 12 - special = false - } - ``` - * A unique `connection_name` is generated by appending a 12-character random string to the variable name given by the user - * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal - * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal +* Create the connection using the Equinix Terraform provider. +* Then manually accept the connection request in the Alibaba Portal for the created physical connection. #### 2. Delete Resources * Run `terraform destroy` to delete the Alibaba VBR diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index 9de3573ff..df31d28e7 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -100,24 +100,8 @@ Port to Alibaba Connection EVPL_VC Connection: #### 1. Create and Accept the Connection -Create the connection using the Equinix Terraform provider. Then manually accept the connection request in the Alibaba Portal for the created physical connection. - -**Note:** The `connection_name` must follow either one of these patterns: - -* A unique `connection_name` with atmost 24 characters -`connection_name = var.connection_name` -* A `connection_name` with atmost 12 characters combined with a random string of 12 characters: - `connection_name = "${var.connection_name}${random_string.random.result}"` - Use the `random_string` resource to perform this operation: - ```hcl - resource "random_string" "random" { - length = 12 - special = false - } - ``` - * A unique `connection_name` is generated by appending a 12-character random string to the variable name given by the user - * A Fabric Port to Alibaba Profile Connection is successfully created and displayed in the Fabric Portal - * An Express Connect Physical Connection resource is created and becomes visible in the Alibaba Portal +* Create the connection using the Equinix Terraform provider. +* Then manually accept the connection request in the Alibaba Portal for the created physical connection. #### 2. Delete Resources * Run `terraform destroy` to delete the Alibaba VBR From 188f7ae5d84603a117fe050e746bd523cc61287e Mon Sep 17 00:00:00 2001 From: d-bhola Date: Fri, 22 Nov 2024 17:14:29 -0800 Subject: [PATCH 5/6] CXF-99867: Remove period --- docs/resources/fabric_connection.md | 4 ++-- templates/resources/fabric_connection.md.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index b288ef03d..18e379c25 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -737,8 +737,8 @@ Port to Alibaba Connection EVPL_VC Connection: #### 1. Create and Accept the Connection -* Create the connection using the Equinix Terraform provider. -* Then manually accept the connection request in the Alibaba Portal for the created physical connection. +* Create the connection using the Equinix Terraform provider +* Then manually accept the connection request in the Alibaba Portal for the created physical connection #### 2. Delete Resources * Run `terraform destroy` to delete the Alibaba VBR diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index df31d28e7..299b4753e 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -100,8 +100,8 @@ Port to Alibaba Connection EVPL_VC Connection: #### 1. Create and Accept the Connection -* Create the connection using the Equinix Terraform provider. -* Then manually accept the connection request in the Alibaba Portal for the created physical connection. +* Create the connection using the Equinix Terraform provider +* Then manually accept the connection request in the Alibaba Portal for the created physical connection #### 2. Delete Resources * Run `terraform destroy` to delete the Alibaba VBR From 0f793bc327c36944223aeee0143e47df581264ad Mon Sep 17 00:00:00 2001 From: d-bhola Date: Fri, 22 Nov 2024 17:18:50 -0800 Subject: [PATCH 6/6] CXF-99867: Remove extra line --- docs/resources/fabric_connection.md | 1 - templates/resources/fabric_connection.md.tmpl | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/resources/fabric_connection.md b/docs/resources/fabric_connection.md index 18e379c25..ad816f866 100644 --- a/docs/resources/fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -736,7 +736,6 @@ Port to Alibaba Connection EVPL_VC Connection: ### Step by Step Instructions for the Fabric Port to Fabric Alibaba Profile Connection Example Given Below #### 1. Create and Accept the Connection - * Create the connection using the Equinix Terraform provider * Then manually accept the connection request in the Alibaba Portal for the created physical connection diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl index 299b4753e..9c403a4f0 100644 --- a/templates/resources/fabric_connection.md.tmpl +++ b/templates/resources/fabric_connection.md.tmpl @@ -99,7 +99,6 @@ Port to Alibaba Connection EVPL_VC Connection: ### Step by Step Instructions for the Fabric Port to Fabric Alibaba Profile Connection Example Given Below #### 1. Create and Accept the Connection - * Create the connection using the Equinix Terraform provider * Then manually accept the connection request in the Alibaba Portal for the created physical connection