-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
29 lines (26 loc) · 825 Bytes
/
main.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
# Resource name prefix
resource "random_string" "name_prefix" {
length = 3
special = false
upper = false
}
locals {
name_prefix = "demoday-${random_string.name_prefix.result}"
metal_router_ip = cidrhost(var.metal_bgp_peer_subnet, 0)
metal_router_netmask = cidrnetmask(cidrsubnet(var.metal_bgp_peer_subnet, -1, -1))
fabric_router_ip = cidrhost(var.metal_bgp_peer_subnet, 1)
// Direct Connect ID
aws_dx_connection_id = [
for z in data.equinix_fabric_connection.aws.z_side : [
for ap in z.access_point : ap.provider_connection_id
][0]
][0]
// Direct Virtual Interface VXLAN
aws_dx_vif_vlan = [
for z in data.equinix_fabric_connection.aws.z_side : [
for ap in z.access_point : [
for lp in ap.link_protocol : lp.vlan_tag
][0]
][0]
][0]
}