File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
modules/interconnect_attachment Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ module "interface" {
3636 ip_range = google_compute_interconnect_attachment. attachment . cloud_router_ip_address
3737 interconnect_attachment = google_compute_interconnect_attachment. attachment . self_link
3838 peers = [{
39- name = var.peer.name
40- peer_ip_address = var.peer.peer_ip_address
39+ name = var.peer.name
40+
41+ # Peer IP Address must not contain the subnet mask, else will throw an invalid IP address error.
42+ peer_ip_address = element (split (" /" , google_compute_interconnect_attachment. attachment . customer_router_ip_address ), 0 )
4143 peer_asn = var.peer.peer_asn
4244 advertised_route_priority = lookup (var. peer , " advertised_route_priority" , null )
4345 }]
Original file line number Diff line number Diff line change @@ -18,3 +18,8 @@ output "attachment" {
1818 value = google_compute_interconnect_attachment. attachment
1919 description = " The created attachment"
2020}
21+
22+ output "customer_router_ip_address" {
23+ value = google_compute_interconnect_attachment. attachment . customer_router_ip_address
24+ description = " IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment."
25+ }
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ variable "interface" {
8080}
8181
8282# Type: object, with fields:
83- # - peer_ip_address (string, required): IP address of the BGP interface outside Google Cloud Platform.
8483# - peer_asn (string, required): Peer BGP Autonomous System Number (ASN).
8584# - advertised_route_priority (number, optional): The priority of routes advertised to this BGP peer.
8685variable "peer" {
You can’t perform that action at this time.
0 commit comments