Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/equinix-labs/terraform-equinix-fabric-connection

Terraform module to create an Equinix Fabric L2 Connection
https://github.com/equinix-labs/terraform-equinix-fabric-connection

equinix equinix-fabric infrastructure-as-code terraform terraform-provider

Last synced: 7 days ago
JSON representation

Terraform module to create an Equinix Fabric L2 Connection

Awesome Lists containing this project

README

        

# Equinix Fabric L2 Connection Terraform module

[![Experimental](https://img.shields.io/badge/Stability-Experimental-red.svg)](https://github.com/equinix-labs/standards#about-uniform-standards)
[![terraform](https://github.com/equinix-labs/terraform-equinix-template/actions/workflows/integration.yaml/badge.svg)](https://github.com/equinix-labs/terraform-equinix-template/actions/workflows/integration.yaml)

`terraform-equinix-fabric-connection` is a minimal Terraform module that
utilizes the [Terraform provider for Equinix](https://registry.terraform.io/providers/equinix/equinix/latest)
to set up an Equinix Fabric L2 connection.

As part of Platform Equinix, your infrastructure can connect with other
parties, such as public cloud providers, network service providers, or your own
colocation cages in Equinix by defining an [Equinix Fabric - software-defined interconnection](https://docs.equinix.com/en-us/Content/Interconnection/Fabric/Fabric-landing-main.htm).

```mermaid
graph LR
subgraph A-side["Origin (A-side)"]
A-side-node1[Equinix Fabric Port /
Network Edge Device /
Service Token]
end

subgraph Z-side["Destination (Z-side)"]
Z-side-node1[Service Provider /
Customer /
Colo]
end

A-side-node1 -->|"Equinix Fabric
L2 Connection
(50Mbps - 10Gbps)"| Z-side-node1
```

--> **NOTE:**
To establish an Equinix Fabric connection, you need to combine and configure
various parameters based on the types of origin and destination. Additionally,
you must configure the platform of the service you are connecting to, such as
creating an Interconnect Attachment in Google Cloud platform or approving a
Direct Connect request in AWS. While this module can be utilized independently,
its primary purpose is to be utilized by other service-specific modules. This
abstraction simplifies the process and includes all the required configuration
on the target platform.

Please click on the link below to explore the available service-specific
modules:

[Available service-specific modules](https://registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection)

## Usage

Please note that this project is experimental and is supported by the user
community. Equinix does not provide support for this project.

To install Terraform, please refer to the official guides at [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli).

You are free to fork, clone, or download this project and modify it as needed
for your integrations and deployments.

Additionally, you can use this project as a [Terraform module](https://learn.hashicorp.com/collections/terraform/modules).

To utilize this module in a new project, create a file such as:

```hcl
# main.tf
provider "equinix" {}

module "equinix_fabric_connection" {
source = "equinix-labs/fabric-connection/equinix"

# required variables
notification_users = ["[email protected]"]

# optional variables
seller_profile_name = "Azure ExpressRoute"
seller_metro_code = "FR"
seller_authorization_key = "Express-Route-Service-Key"
port_name = "Fabric-Port-FR-Pri"
vlan_stag = 1010
named_tag = "PRIVATE"
redundancy_type = "REDUNDANT"
secondary_port_name = "Fabric-Port-FR-Sec"
secondary_vlan_stag = 1020
}
```

Run `terraform init -upgrade` and `terraform apply`.

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13 |
| [equinix](#requirement\_equinix) | ~> 1.14 |
| [random](#requirement\_random) | 3.6.0 |

## Providers

| Name | Version |
|------|---------|
| [equinix](#provider\_equinix) | ~> 1.14 |
| [random](#provider\_random) | 3.6.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [equinix_fabric_connection.primary](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) | resource |
| [equinix_fabric_connection.secondary](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/fabric_connection) | resource |
| [random_string.this](https://registry.terraform.io/providers/hashicorp/random/3.6.0/docs/resources/string) | resource |
| [equinix_fabric_ports.primary](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/fabric_ports) | data source |
| [equinix_fabric_ports.secondary](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/fabric_ports) | data source |
| [equinix_fabric_ports.zside](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/fabric_ports) | data source |
| [equinix_fabric_service_profiles.sp](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/fabric_service_profiles) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [notification\_users](#input\_notification\_users) | A list of email addresses used to notify all connection configuration or status changes. One of
'notification\_users' or 'notification\_users\_by\_type' is required. This is equivalent to adding a
list to 'notification\_users\_by\_type' with the key type ALL. | `list(string)` | n/a | yes |
| [additional\_info](#input\_additional\_info) | Additional parameters required for some connections. It should be a list of maps containing
'name' and 'value e.g. `[{ name='asn' value = '65000'}, { name='ip' value = '192.168.0.1'}]`. |

list(object({
name = string,
value = string
})
)
| `[]` | no |
| [connection\_type](#input\_connection\_type) | Defines the connection type like EVPL\_VC, EPL\_VC, IP\_VC, ACCESS\_EPL\_VC, IA\_VC, EVPLAN\_VC,
EPLAN\_VC, IPWAN\_VC. If not specified, it will be inferred based on access point types.
In cases where the type cannot be identified based on these parameters, the default value will
be 'EVPL\_VC'. | `string` | `""` | no |
| [name](#input\_name) | Name of the connection resource that will be created. It will be auto-generated if not
specified. | `string` | `""` | no |
| [named\_tag](#input\_named\_tag) | The type of peering to set up in case when connecting to Azure Express Route. One of 'PRIVATE',
'MICROSOFT'. | `string` | `""` | no |
| [network\_edge\_id](#input\_network\_edge\_id) | Unique identifier of the Network Edge virtual device from which the connection would
originate. | `string` | `""` | no |
| [network\_edge\_interface\_id](#input\_network\_edge\_interface\_id) | Applicable with 'network\_edge\_id', identifier of network interface on a given device, used for a
connection. If not specified then first available interface will be selected. | `number` | `0` | no |
| [network\_edge\_secondary\_id](#input\_network\_edge\_secondary\_id) | Unique identifier of the Network Edge virtual device from which the secondary connection would
originate. If not specified, and 'network\_edge\_id' is specified, and 'redundancy\_type' is
'REDUNDANT' then primary edge device will be used. | `string` | `""` | no |
| [network\_edge\_secondary\_interface\_id](#input\_network\_edge\_secondary\_interface\_id) | Applicable with 'network\_edge\_id' or 'network\_edge\_secondary\_id', identifier of network interface
on a given device, used for a connection. If not specified then first available interface will be
selected. | `number` | `0` | no |
| [notification\_users\_by\_type](#input\_notification\_users\_by\_type) | A map where each key represents a notification type (e.g., 'BANDWIDTH\_ALERT', 'ALL') and the
value is a list of email addresses. This structure allows for the categorization of email
addresses based on the type of notification they should receive. One of
'notification\_users\_by\_type' or 'notification\_users' is required. Valid map keys are: ALL,
BANDWIDTH\_ALERT, CONNECTION\_APPROVAL, PROFILE\_LIFECYCLE, SALES\_REP\_NOTIFICATIONS. | `map(list(string))` | `{}` | no |
| [port\_name](#input\_port\_name) | Name of the buyer's port from which the primary connection would originate. One of 'port\_name',
'network\_edge\_id' or 'service\_token\_id' is required. | `string` | `""` | no |
| [purchase\_order\_number](#input\_purchase\_order\_number) | Connection's purchase order number to reflect on the invoice. | `string` | `""` | no |
| [redundancy\_type](#input\_redundancy\_type) | Whether to create a single connection or redundant. Fabric secondary variables will take no
effect unless value 'REDUNDANT' is specified. | `string` | `"SINGLE"` | no |
| [secondary\_name](#input\_secondary\_name) | Name of the secondary connection that will be created. It will be auto-generated
if not specified. | `string` | `""` | no |
| [secondary\_port\_name](#input\_secondary\_port\_name) | Name of the buyer's port from which the secondary connection would originate. If not specified,
and 'port\_name' is specified, and 'redundancy\_type' is 'REDUNDANT', then the value of 'port\_name'
will be used. | `string` | `""` | no |
| [secondary\_seller\_authorization\_key](#input\_secondary\_seller\_authorization\_key) | Text field used to authorize secondary connection on the provider side. Value depends on a
provider service profile used for connection. | `string` | `""` | no |
| [secondary\_seller\_metro\_code](#input\_secondary\_seller\_metro\_code) | Metro code where the secondary connection will be created. If not specified then primary
connection metro code will be used. | `string` | `""` | no |
| [secondary\_seller\_metro\_name](#input\_secondary\_seller\_metro\_name) | Metro name where the secondary connection will be created, i.e. 'Frankfurt', 'Silicon Valley',
'Ashburn'. If not specified then primary connection metro name will be used. | `string` | `""` | no |
| [secondary\_seller\_region](#input\_secondary\_seller\_region) | The region in which the seller port resides, i.e. 'eu-west-1'. If not specified then primary
connection region will be used. | `string` | `""` | no |
| [secondary\_service\_token\_id](#input\_secondary\_service\_token\_id) | Unique Equinix Fabric key shared with you by a provider that grants you authorization to use
their interconnection asset from (a-side) which the secondary connection would originate.
Required if 'service\_token\_id' is specified, and 'redundancy\_type' is 'REDUNDANT'. | `string` | `""` | no |
| [secondary\_speed](#input\_secondary\_speed) | Speed/Bandwidth to be allocated to the secondary connection - (MB or GB). If not specified then
primary connection speed will be used. | `number` | `0` | no |
| [secondary\_speed\_unit](#input\_secondary\_speed\_unit) | DEPRECATED and IGNORED: This variable is no longer used as speed is always assumed to be in MB
(megabytes). Specifying this variable will have no effect. | `string` | `""` | no |
| [secondary\_vlan\_ctag](#input\_secondary\_vlan\_ctag) | VLAN C-Tag/Inner-Tag information for QINQ secondary connections. A numeric character ranging from
2 - 4094. | `number` | `0` | no |
| [secondary\_vlan\_stag](#input\_secondary\_vlan\_stag) | VLAN S-Tag/Outer-Tag information for QINQ secondary connections, or VLAN Tag information for
DOT1Q. Required if 'secondary\_port\_name' (A side). A numeric character ranging from 2 - 4094. | `number` | `0` | no |
| [secondary\_zside\_service\_token\_id](#input\_secondary\_zside\_service\_token\_id) | Unique Equinix Fabric key shared with you by a provider that grants you authorization to use
their interconnection asset to (z-side) which the secondary connection would arrive. | `string` | `""` | no |
| [seller\_authorization\_key](#input\_seller\_authorization\_key) | Text field used to authorize connection on the provider side. Value depends on a provider service
profile used for connection. | `string` | `""` | no |
| [seller\_metro\_code](#input\_seller\_metro\_code) | Metro code where the connection will be created. If you do not know the code,'seller\_metro\_name'
can be use instead. | `string` | `""` | no |
| [seller\_metro\_name](#input\_seller\_metro\_name) | Metro name where the connection will be created, i.e. 'Frankfurt', 'Silicon Valley', 'Ashburn'.
Only required if 'seller\_profile\_name' is specified and in the absence of 'seller\_metro\_code'. | `string` | `""` | no |
| [seller\_profile\_name](#input\_seller\_profile\_name) | Unique identifier of the service provider's profile. One of 'seller\_profile\_name' or
'zside\_port\_name' is required. | `string` | `""` | no |
| [seller\_region](#input\_seller\_region) | The region in which the seller port resides, i.e. 'eu-west-1'. Required only in cases where you
need a specific region of a service provider with several regions per metro. Generally there is
only one region per metro, and it will be used the first available region in the metro of the
specified seller profile. | `string` | `""` | no |
| [service\_token\_id](#input\_service\_token\_id) | Unique Equinix Fabric key shared with you by a provider that grants you authorization to use
their interconnection asset from (a-side) which the connection would originate. | `string` | `""` | no |
| [speed](#input\_speed) | Speed/Bandwidth to be allocated to the connection - (MB or GB). If not specified, it will be used
the minimum bandwidth available for the specified seller profile. | `number` | `0` | no |
| [speed\_unit](#input\_speed\_unit) | DEPRECATED and IGNORED: This variable is no longer used as speed is always assumed to be in MB
(megabytes). Specifying this variable will have no effect. | `string` | `""` | no |
| [vlan\_ctag](#input\_vlan\_ctag) | VLAN C-Tag/Inner-Tag information for QINQ connections. A numeric character ranging from 2 - 4094. | `number` | `0` | no |
| [vlan\_stag](#input\_vlan\_stag) | VLAN S-Tag/Outer-Tag information for QINQ connections, or VLAN Tag information for DOT1Q.
Required if 'port\_name' (A side). A numeric character ranging from 2 - 4094. | `number` | `0` | no |
| [zside\_port\_name](#input\_zside\_port\_name) | Name of the buyer's port from which the connection would originate the port on the remote side
(z-side). Required when destination is another port instead of a service profile. Usually, if
you don't have an existing private service profile, this option offers a simple, streamlined
way to set up a connection between your own ports. Not compatible with redundant connections. | `string` | `""` | no |
| [zside\_service\_token\_id](#input\_zside\_service\_token\_id) | Unique Equinix Fabric key shared with you by a provider that grants you authorization to use
their interconnection asset to (z-side) which the connection would arrive. | `string` | `""` | no |
| [zside\_vlan\_ctag](#input\_zside\_vlan\_ctag) | VLAN C-Tag/Inner-Tag information for QINQ connections. A numeric character ranging from 2 - 4094. | `number` | `0` | no |
| [zside\_vlan\_stag](#input\_zside\_vlan\_stag) | VLAN S-Tag/Outer-Tag information for QINQ connections, or VLAN Tag information for DOT1Q.
Required if 'zside\_port\_name' (Z side). A numeric character ranging from 2 - 4094. | `number` | `0` | no |

## Outputs

| Name | Description |
|------|-------------|
| [primary\_connection](#output\_primary\_connection) | Primary connection data. |
| [secondary\_connection](#output\_secondary\_connection) | Secondary connection data. |

## Examples

- [Fabric Port connection to Service Provider](https://registry.terraform.io/modules/equinix-labs/fabric-connection/equinix/latest/examples/fabric-port-connection-to-sp/)

## Contributing

If you would like to contribute to this module, see the [CONTRIBUTING](CONTRIBUTING.md)
page.

## License

Apache License, Version 2.0. See [LICENSE](LICENSE).