diff --git a/docs/resources/equinix_ecx_l2_connection.md b/docs/resources/equinix_ecx_l2_connection.md
index 09a2af98d..626d0c062 100644
--- a/docs/resources/equinix_ecx_l2_connection.md
+++ b/docs/resources/equinix_ecx_l2_connection.md
@@ -61,7 +61,7 @@ resource "equinix_ecx_l2_connection" "ports-2-azure" {
vlan_ctag = 2512
seller_metro_code = "SV"
named_tag = "PRIVATE"
- authorization_key = "c4dff8e8-b52f-4b34-b0d4-c4588f7338f3
+ authorization_key = "c4dff8e8-b52f-4b34-b0d4-c4588f7338f3"
secondary_connection {
name = "tf-azure-sec"
port_uuid = data.equinix_ecx_port.sv-qinq-sec.id
diff --git a/docs/resources/equinix_fabric_connection.md b/docs/resources/equinix_fabric_connection.md
index edf9fc885..a54d82f4b 100644
--- a/docs/resources/equinix_fabric_connection.md
+++ b/docs/resources/equinix_fabric_connection.md
@@ -64,6 +64,7 @@ Optional:
- **Deprecated** `gateway` Use `router` attribute instead; (Block Set) (see [below for nested schema](#nestedblock--a_side--access_point--router))
- `router` (Block Set) Cloud Router access point information that replaces `gateway` (refers to [below for nested schema](#nestedblock--a_side--access_point--router))
- `interface` (Block Set) Virtual device interface (see [below for nested schema](#nestedblock--a_side--access_point--interface))
+- `network` (Block Set) Simplified Network (see [below for nested schema](#nestedblock--a_side--access_point--network))
- `link_protocol` (Block Set) Connection link protocol (see [below for nested schema](#nestedblock--a_side--access_point--link_protocol))
- `location` (Block Set) Access point location (see [below for nested schema](#nestedblock--a_side--access_point--location))
- `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL
@@ -103,6 +104,12 @@ Read-Only:
- `id` (String) id
+
+### Nested Schema for `a_side.access_point.network`
+
+Required:
+- `uuid` (String) Equinix-assigned network identifier
+
### Nested Schema for `a_side.access_point.link_protocol`
@@ -190,8 +197,10 @@ Optional:
Optional:
- `type` (String) Virtual Device type
+- `name` (String) Customer-assigned Virtual Device Name
- `uuid` (String) Equinix-assigned Virtual Device identifier
+
Read-Only:
- `href` (String) Unique Resource Identifier
@@ -220,6 +229,7 @@ Optional:
- `key` (String) Additional information key
- `value` (String) Additional information value
+~> **NOTE:** Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: `{"key": "ASN", "value": "1111"}` `{"key": "Global", "value": "false"}` `{"key": "BGP_IBM_CIDR", "value": "172.16.0.18/30"}` `{"key": "BGP_CER_CIDR", "value": "172.16.0.19/30"}`
### Nested Schema for `a_side.service_token`
diff --git a/equinix/fabric_connection_schema.go b/equinix/fabric_connection_schema.go
index a92e86654..4b841d3a9 100755
--- a/equinix/fabric_connection_schema.go
+++ b/equinix/fabric_connection_schema.go
@@ -229,6 +229,11 @@ func createAccessPointVirtualDeviceSch() map[string]*schema.Schema {
Optional: true,
Description: "Virtual Device type",
},
+ "name": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Customer-assigned Virtual Device Name",
+ },
}
}
@@ -240,7 +245,7 @@ func createAccessPointInterface() map[string]*schema.Schema {
Description: "Equinix-assigned interface identifier",
},
"id": {
- Type: schema.TypeString,
+ Type: schema.TypeInt,
Computed: true,
Description: "id",
},
diff --git a/equinix/fabric_mapping_helper.go b/equinix/fabric_mapping_helper.go
index 0ea1551bb..8d8bca7f1 100644
--- a/equinix/fabric_mapping_helper.go
+++ b/equinix/fabric_mapping_helper.go
@@ -41,6 +41,8 @@ func accessPointToFabric(accessPointRequest []interface{}) v4.AccessPoint {
portList := accessPointMap["port"].(*schema.Set).List()
profileList := accessPointMap["profile"].(*schema.Set).List()
locationList := accessPointMap["location"].(*schema.Set).List()
+ virtualdeviceList := accessPointMap["virtual_device"].(*schema.Set).List()
+ interfaceList := accessPointMap["interface"].(*schema.Set).List()
networkList := accessPointMap["network"].(*schema.Set).List()
typeVal := accessPointMap["type"].(string)
authenticationKey := accessPointMap["authentication_key"].(string)
@@ -108,6 +110,16 @@ func accessPointToFabric(accessPointRequest []interface{}) v4.AccessPoint {
accessPoint.Location = &sl
}
+ if len(virtualdeviceList) != 0 {
+ vd := virtualdeviceToFabric(virtualdeviceList)
+ accessPoint.VirtualDevice = &vd
+ }
+
+ if len(interfaceList) != 0 {
+ il := interfaceToFabric(interfaceList)
+ accessPoint.Interface_ = &il
+ }
+
}
return accessPoint
}
@@ -252,6 +264,31 @@ func locationToFabric(locationList []interface{}) v4.SimplifiedLocation {
return sl
}
+func virtualdeviceToFabric(virtualdeviceList []interface{}) v4.VirtualDevice {
+ vd := v4.VirtualDevice{}
+ for _, ll := range virtualdeviceList {
+ llMap := ll.(map[string]interface{})
+ hr := llMap["href"].(string)
+ tp := llMap["type"].(string)
+ ud := llMap["uuid"].(string)
+ na := llMap["name"].(string)
+ vd = v4.VirtualDevice{Href: hr, Type_: tp, Uuid: ud, Name: na}
+ }
+ return vd
+}
+
+func interfaceToFabric(interfaceList []interface{}) v4.ModelInterface {
+ il := v4.ModelInterface{}
+ for _, ll := range interfaceList {
+ llMap := ll.(map[string]interface{})
+ ud := llMap["uuid"].(string)
+ tp := llMap["type"].(string)
+ id := llMap["id"].(int)
+ il = v4.ModelInterface{Type_: tp, Uuid: ud, Id: int32(id)}
+ }
+ return il
+}
+
func accountToCloudRouter(accountList []interface{}) v4.SimplifiedAccount {
sa := v4.SimplifiedAccount{}
for _, ll := range accountList {
diff --git a/examples/fabric/v4/portConnectivity/ibm/ibm2/README.md b/examples/fabric/v4/portConnectivity/ibm/ibm2/README.md
index 70e206964..26f0a1209 100644
--- a/examples/fabric/v4/portConnectivity/ibm/ibm2/README.md
+++ b/examples/fabric/v4/portConnectivity/ibm/ibm2/README.md
@@ -30,6 +30,12 @@ At minimum, you must set below variables in `terraform.tfvars` file:
`seller_asn` - Seller ASN Number
`seller_region` - Seller Region
+## Note
+* You can modify the IBM side of the connection using parameters passed to additional_info field
+ `{"key": "Global", "value": "false"}`
+ `{"key": "BGP_IBM_CIDR", "value": "172.16.0.18/30"}`
+ `{"key": "BGP_CER_CIDR", "value": "172.16.0.19/30"}`
+
## IBM login
Log in to IBM portal with an account that has permission to create necessary resources.
diff --git a/examples/fabric/v4/portConnectivity/ibm/ibm2/main.tf b/examples/fabric/v4/portConnectivity/ibm/ibm2/main.tf
index f55849e02..65698a8fa 100644
--- a/examples/fabric/v4/portConnectivity/ibm/ibm2/main.tf
+++ b/examples/fabric/v4/portConnectivity/ibm/ibm2/main.tf
@@ -28,7 +28,7 @@ resource "equinix_fabric_connection" "ibm2" {
bandwidth = var.bandwidth
- additional_info = [{key = "ASN", value = var.seller_asn }, {"key"= "Global","value" = "false"}, {"key" = "BGP_IBM_CIDR","value" = "172.16.0.18/30"},{"key" = "BGP_CER_CIDR","value" = "172.16.0.19/30"} ]
+ additional_info = [{key = "ASN", value = var.seller_asn }]
redundancy { priority = var.redundancy }
order {