Skip to content

Commit

Permalink
fix: Fixing METAL NIMF docs (#749)
Browse files Browse the repository at this point in the history
Fixing Metal-NIMF doc examples
Reference:
#744
  • Loading branch information
srushti-patl authored Aug 9, 2024
2 parents 0baf032 + c158f0b commit 59af0b3
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 77 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/metal_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +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).
* `authorization_code` - Fabric Authorization Code to configure the Metal-Fabric Integration 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).
8 changes: 4 additions & 4 deletions docs/resources/fabric_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ resource "equinix_fabric_connection" "evplan" {
}
```

NIMF Metal to AWS EVPL_VC Connection:
(Metal-Fabric Integration) Metal to AWS EVPL_VC Connection:

```terraform
resource "equinix_fabric_connection" "metal2aws" {
Expand Down Expand Up @@ -700,7 +700,7 @@ resource "equinix_fabric_connection" "metal2aws" {
}
```

NIMF Fabric Cloud Router to Metal IP_VC Connection:
(Metal-Fabric Integration) Fabric Cloud Router to Metal IP_VC Connection:

```terraform
resource "equinix_fabric_connection" "fcr2metal" {
Expand Down Expand Up @@ -791,7 +791,7 @@ Optional:

Optional:

- `authentication_key` (String) Authentication key for provider based connections or Metal NIMF connections
- `authentication_key` (String) Authentication key for provider based connections or Metal-Fabric Integration 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))
Expand Down Expand Up @@ -1008,7 +1008,7 @@ Optional:

Optional:

- `authentication_key` (String) Authentication key for provider based connections or Metal NIMF connections
- `authentication_key` (String) Authentication key for provider based connections or Metal-Fabric Integration 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))
Expand Down
53 changes: 20 additions & 33 deletions docs/resources/metal_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ 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
### Shared Connection with authorization_code Non-redundant Metal-Fabric Integration connection from Equinix Metal to a Cloud Service Provider via Equinix Fabric Port

```terraform
resource "equinix_metal_vlan" "example1" {
Expand All @@ -139,16 +139,12 @@ resource "equinix_metal_connection" "example" {
name = "tf-port-to-metal-legacy"
project_id = local.my_project_id
metro = "SV"
redundancy = "redundant"
type = "shared"
redundancy = "primary"
type = "shared_port_vlan"
contact_email = "[email protected]"
vlans = [
equinix_metal_vlan.example1.vxlan,
equinix_metal_vlan.example2.vxlan
]
vlans = [ equinix_metal_vlan.example1.vxlan ]
}
data "equinix_fabric_service_profiles" "zside" {
count = var.zside_ap_type == "SP" ? 1 : 0
filter {
property = "/name"
operator = "="
Expand All @@ -172,7 +168,7 @@ resource "equinix_fabric_connection" "example" {
a_side {
access_point {
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.metal-connection.authorization_code
authentication_key = equinix_metal_connection.example.authorization_code
}
}
z_side {
Expand All @@ -182,7 +178,7 @@ resource "equinix_fabric_connection" "example" {
seller_region = "us-west-1"
profile {
type = "L2_PROFILE"
uuid = data.equinix_fabric_service_profiles.zside[0].id
uuid = data.equinix_fabric_service_profiles.zside.id
}
location {
metro_code ="SV"
Expand All @@ -192,7 +188,7 @@ resource "equinix_fabric_connection" "example" {
}
```

### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Fabric Cloud Router to Equinix Metal
### Shared Connection with authorization_code Non-redundant Metal-Fabric Integration connection from Equinix Fabric Cloud Router to Equinix Metal

```terraform
resource "equinix_metal_vlan" "example1" {
Expand All @@ -203,17 +199,14 @@ resource "equinix_metal_connection" "example" {
name = "tf-port-to-metal-legacy"
project_id = local.my_project_id
metro = "SV"
redundancy = "redundant"
type = "shared"
redundancy = "primary"
type = "shared_port_vlan"
contact_email = "[email protected]"
vlans = [
equinix_metal_vlan.example1.vxlan,
equinix_metal_vlan.example2.vxlan
]
vlans = [ equinix_metal_vlan.example1.vxlan ]
}
resource "equinix_fabric_connection" "example" {
name = "tf-NIMF-metal-2-aws-legacy"
type = "EVPL_VC"
type = "IP_VC"
notifications {
type = "ALL"
emails = "[email protected]"
Expand All @@ -226,23 +219,17 @@ resource "equinix_fabric_connection" "example" {
purchase_order_number = "1-323292"
}
a_side {
access_point {
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.metal-connection.authorization_code
}
access_point {
type = "CLOUD_ROUTER"
router {
uuid = local.cloud_router_uuid
}
}
}
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"
}
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.example.authorization_code
}
}
}
Expand Down Expand Up @@ -275,4 +262,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).
* `authorization_code` - Fabric Authorization code to configure the Metal-Fabric Integration 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).
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ resource "equinix_metal_connection" "example" {
name = "tf-port-to-metal-legacy"
project_id = local.my_project_id
metro = "SV"
redundancy = "redundant"
type = "shared"
redundancy = "primary"
type = "shared_port_vlan"
contact_email = "[email protected]"
vlans = [
equinix_metal_vlan.example1.vxlan,
equinix_metal_vlan.example2.vxlan
]
vlans = [ equinix_metal_vlan.example1.vxlan ]
}
resource "equinix_fabric_connection" "example" {
name = "tf-NIMF-metal-2-aws-legacy"
type = "EVPL_VC"
type = "IP_VC"
notifications {
type = "ALL"
emails = "[email protected]"
Expand All @@ -29,23 +26,17 @@ resource "equinix_fabric_connection" "example" {
purchase_order_number = "1-323292"
}
a_side {
access_point {
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.metal-connection.authorization_code
}
access_point {
type = "CLOUD_ROUTER"
router {
uuid = local.cloud_router_uuid
}
}
}
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"
}
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.example.authorization_code
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ resource "equinix_metal_connection" "example" {
name = "tf-port-to-metal-legacy"
project_id = local.my_project_id
metro = "SV"
redundancy = "redundant"
type = "shared"
redundancy = "primary"
type = "shared_port_vlan"
contact_email = "[email protected]"
vlans = [
equinix_metal_vlan.example1.vxlan,
equinix_metal_vlan.example2.vxlan
]
vlans = [ equinix_metal_vlan.example1.vxlan ]
}
data "equinix_fabric_service_profiles" "zside" {
count = var.zside_ap_type == "SP" ? 1 : 0
filter {
property = "/name"
operator = "="
Expand All @@ -39,7 +35,7 @@ resource "equinix_fabric_connection" "example" {
a_side {
access_point {
type = "METAL_NETWORK"
authentication_key = equinix_metal_connection.metal-connection.authorization_code
authentication_key = equinix_metal_connection.example.authorization_code
}
}
z_side {
Expand All @@ -49,7 +45,7 @@ resource "equinix_fabric_connection" "example" {
seller_region = "us-west-1"
profile {
type = "L2_PROFILE"
uuid = data.equinix_fabric_service_profiles.zside[0].id
uuid = data.equinix_fabric_service_profiles.zside.id
}
location {
metro_code ="SV"
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/fabric/connection/resource_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func accessPointSch() *schema.Resource {
"authentication_key": {
Type: schema.TypeString,
Optional: true,
Description: "Authentication key for provider based connections or Metal NIMF connections",
Description: "Authentication key for provider based connections or Metal-Fabric Integration connections",
},
"provider_connection_id": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion templates/data-sources/metal_connection.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +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).
* `authorization_code` - Fabric Authorization Code to configure the Metal-Fabric Integration 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).
4 changes: 2 additions & 2 deletions templates/resources/fabric_connection.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ EVPLAN Port to Network Connection:

{{tffile "examples/resources/fabric_connection/port_to_network_evplan.tf"}}

NIMF Metal to AWS EVPL_VC Connection:
(Metal-Fabric Integration) Metal to AWS EVPL_VC Connection:

{{tffile "examples/resources/fabric_connection/metal_to_aws.tf"}}

NIMF Fabric Cloud Router to Metal IP_VC Connection:
(Metal-Fabric Integration) Fabric Cloud Router to Metal IP_VC Connection:

{{tffile "examples/resources/fabric_connection/fcr_to_metal.tf"}}

Expand Down
10 changes: 5 additions & 5 deletions templates/resources/metal_connection.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ Use this resource to request the creation an Interconnection asset to connect wi

{{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
### Shared Connection with authorization_code Non-redundant Metal-Fabric Integration connection from Equinix Metal to a Cloud Service Provider via Equinix Fabric Port

{{tffile "examples/resources/metal_connection/shared_nimf_to_csp.tf"}}
{{tffile "examples/resources/metal_connection/shared_metal_fabric_connection_to_csp.tf"}}

### Shared Connection with authorization_code Non-redundant NIMF connection from Equinix Fabric Cloud Router to Equinix Metal
### Shared Connection with authorization_code Non-redundant Metal-Fabric Integration connection from Equinix Fabric Cloud Router to Equinix Metal

{{tffile "examples/resources/metal_connection/shared_nimf_from_fcr.tf"}}
{{tffile "examples/resources/metal_connection/shared_metal_fabric_connection_from_fcr.tf"}}

## Argument Reference

Expand Down Expand Up @@ -65,4 +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).
* `authorization_code` - Fabric Authorization code to configure the Metal-Fabric Integration 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).

0 comments on commit 59af0b3

Please sign in to comment.