equinix-labs / terraform-equinix-fabric-connection-aws Goto Github PK
View Code? Open in Web Editor NEWTerraform module to create a Fabric L2 Connection to AWS Direct Connect
License: Apache License 2.0
Terraform module to create a Fabric L2 Connection to AWS Direct Connect
License: Apache License 2.0
With AWS provider v4.25.0, the sitelink_enabled
field should be defined to the default of false, rather than not specified to avoid the condition where the aws_dx_private_virtual_interface is recreated on each refresh.
-/+ resource "aws_dx_private_virtual_interface" "this" {
~ amazon_side_asn = "..." -> (known after apply)
~ arn = "..." -> (known after apply)
~ aws_device = "..." -> (known after apply)
~ id = "..." -> (known after apply)
~ jumbo_frame_capable = true -> (known after apply)
name = "..."
- sitelink_enabled = false -> null
When attempting to make the bgp connection between AWS and the Network Edge switch, I got a 400 error.
So when it got to this step:
module.equinix-fabric-connection-aws.equinix_network_bgp.this[0]: Creating...
It hits this error:
Error: Equinix REST API error: Message: "Bad Request", HTTPCode: 400, ApplicationErrors: [Code: "EQ-4000023", Property: "", Message: "Limited to 6 to 80 characters and can contain most special characters", AdditionalInfo: ""]
with module.equinix-fabric-connection-aws.equinix_network_bgp.this[0],
on .terraform/modules/equinix-fabric-connection-aws/main.tf line 84, in resource "equinix_network_bgp" "this":
84: resource "equinix_network_bgp" "this" {
Here's the request terraform sent:
---[ REQUEST ]---------------------------------------
POST /ne/v1/bgp HTTP/1.1
Host: api.equinix.com
User-Agent: HashiCorp Terraform/1.2.3 (+https://www.terraform.io) Terraform Plugin SDK/2.9.0 terraform-provider-equinix/dev equinix/ne-go
Content-Length: 205
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip
{
"connectionUuid": "********-****-****-****-***********",
"localIpAddress": "169.254.0.2/30",
"localAsn": 65000,
"remoteAsn": 64512,
"remoteIpAddress": "169.254.0.1",
"authenticationKey": "0xN4Fr1issiekPad.iAq1mL5"
}
And here's the result received:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 345
Content-Type: application/json;charset=UTF-8
Date: Mon, 27 Jun 2022 21:28:48 GMT
Server: istio-envoy
X-Application-Context: nfv-services-microservice:prod_aws_usw1:9030
X-Envoy-Upstream-Service-Time: 183
[
{
"errorCode": "EQ-4000023",
"errorMessage": "Limited to 6 to 80 characters and can contain most special characters",
"help": "https://<domain.name>/help/error/EQ-4000023",
"details": "Please confirm the data types and values in the request body, then try again.",
"correlationId": null,
"additionalInfo": [
{
"property": "authenticationKey",
"reason": null
}
]
}
]
If there's an error during destroy, retrying destroy produces an error with the expression
aws_dx_id = one([
for action_data in one(module.equinix-fabric-connection.primary_connection.actions).required_data: action_data["value"]
if action_data["key"] == "awsConnectionId"
])
│ Error: Unsupported attribute
│
│ on .terraform/modules/equinix-fabric-connection-aws-secondary/main.tf line 3, in locals:
│ 3: for action_data in one(module.equinix-fabric-connection.primary_connection.actions).required_data: action_data["value"]
│ ├────────────────
│ │ module.equinix-fabric-connection is object with 1 attribute "secondary_connection"
│
│ This object does not have an attribute named "primary_connection".
Summary:
The module should allow to attach to and/or create a Direct Connect Gateway similar to the VPN Gateway support.
Motivation:
I would use this when I want to increase or decrease capacity for my Equinix connections to AWS Direct Connect Gateways.
Proposal:
I would copy the structure of the VPN Gateway support, with the option to create a Direct Connect Gateway or attach dxvifs to an existing Direct Connect Gateway.
https://github.com/equinix-labs/terraform-equinix-fabric-connection-aws/blob/c9adc91/main.tf#L55-L72
It is very common to hit the default 10m creation timeout:
module.equinix-fabric-connection-aws.aws_dx_private_virtual_interface.this[0]: Still creating... [10m0s elapsed]
╷
│ Error: error waiting for Direct Connect virtual interface (...-...) to become available: timeout while waiting for state to become 'available, down' (last state: 'pending', timeout: 10m0s)
│
│ with module.equinix-fabric-connection-aws.aws_dx_private_virtual_interface.this[0],
│ on .terraform/modules/equinix-fabric-connection-aws/main.tf line 55, in resource "aws_dx_private_virtual_interface" "this":
│ 55: resource "aws_dx_private_virtual_interface" "this" {
│
╵
A few minutes later seems to be sufficient.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/integration.yaml
actions/checkout v2
hashicorp/setup-terraform v3
main.tf
equinix-labs/fabric-connection/equinix 0.4.0
versions.tf
aws >= 3.64
equinix ~> 1.14
hashicorp/terraform >= 0.13
Remove the.teraform.lock.hcl
file and add it to .gitignore
to be in line with the Equinix terraform module standards
When 'aws_dx_create_vgw' is true, 'aws_vpc_id' is empty and there is no default VPC in the selected region it produces below error:
Error: no matching EC2 VPC found
│
│ with module.equinix-fabric-connection-aws.data.aws_vpc.this,
│ on .terraform/modules/equinix-fabric-connection-aws/main.tf line 13, in data "aws_vpc" "this":
│ 13: data "aws_vpc" "this" {
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.