-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathequinix_fabric.tf
43 lines (39 loc) · 1.58 KB
/
equinix_fabric.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Terraform Equinix Fabric resources for Equinix.
*/
resource "equinix_ecx_l2_connection_accepter" "aws" {
connection_id = equinix_ecx_l2_connection.aws.id
access_key = var.aws_access_key
secret_key = var.aws_secret_key
}
//Retrieve AWS profile id
data "equinix_ecx_l2_sellerprofile" "aws" {
name = "AWS Direct Connect"
}
resource "equinix_ecx_l2_connection" "aws" {
name = var.eqx_fabric_aws_primary_connection_name
profile_uuid = data.equinix_ecx_l2_sellerprofile.aws.uuid
speed = var.eqx_fabric_aws_speed
speed_unit = var.eqx_fabric_aws_speed_unit
notifications = var.eqx_fabric_notification_users
device_uuid = local.router_id
seller_region = var.eqx_fabric_aws_seller_region
seller_metro_code = var.eqx_fabric_aws_seller_metro_code
authorization_key = var.eqx_fabric_aws_auth_key
}
//Retrieve GCP profile id
data "equinix_ecx_l2_sellerprofile" "gcp" {
name = "Google Cloud Partner Interconnect Zone 1"
}
//Create ECX L2 connection
resource "equinix_ecx_l2_connection" "gcp" {
name = var.eqx_fabric_gcp_primary_connection_name
profile_uuid = data.equinix_ecx_l2_sellerprofile.gcp.uuid
speed = var.eqx_fabric_gcp_speed
speed_unit = var.eqx_fabric_gcp_speed_unit
notifications = var.eqx_fabric_notification_users
device_uuid = local.router_id
seller_region = var.eqx_fabric_gcp_seller_region
seller_metro_code = var.eqx_fabric_gcp_seller_metro_code
authorization_key = google_compute_interconnect_attachment.interconn-vlan.pairing_key // GCP Service Key
}