diff --git a/modules/interconnect_attachment/README.md b/modules/interconnect_attachment/README.md index db2f92d..9c97aac 100644 --- a/modules/interconnect_attachment/README.md +++ b/modules/interconnect_attachment/README.md @@ -17,7 +17,7 @@ | ipsec\_internal\_addresses | URL of addresses that have been reserved for the interconnect attachment, Used only for interconnect attachment that has the encryption option as IPSEC. | `list(string)` | `[]` | no | | mtu | Maximum Transmission Unit (MTU), in bytes, of packets passing through this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440. | `string` | `null` | no | | name | The name of the interconnect attachment | `string` | n/a | yes | -| peer | BGP Peer for this attachment. |
object({
name = string
peer_asn = string
advertised_route_priority = optional(number)
bfd = optional(object({
session_initialization_mode = string
min_transmit_interval = optional(number)
min_receive_interval = optional(number)
multiplier = optional(number)
}))
md5_authentication_key = optional(object({
name = string
key = string
}))
}) | `null` | no |
+| peer | BGP Peer for this attachment. | object({
name = string
peer_asn = string
advertised_route_priority = optional(number)
zero_advertised_route_priority = optional(bool)
bfd = optional(object({
session_initialization_mode = string
min_transmit_interval = optional(number)
min_receive_interval = optional(number)
multiplier = optional(number)
}))
md5_authentication_key = optional(object({
name = string
key = string
}))
}) | `null` | no |
| project | The project ID to deploy to | `string` | n/a | yes |
| region | Region where the attachment resides | `string` | n/a | yes |
| router | Name of the router the attachment resides | `string` | n/a | yes |
diff --git a/modules/interconnect_attachment/main.tf b/modules/interconnect_attachment/main.tf
index 77fe6f9..1c151f4 100644
--- a/modules/interconnect_attachment/main.tf
+++ b/modules/interconnect_attachment/main.tf
@@ -46,11 +46,12 @@ module "interface" {
name = try(var.peer.name, null)
# Peer IP Address must not contain the subnet mask, else will throw an invalid IP address error.
- peer_ip_address = element(split("/", google_compute_interconnect_attachment.attachment.customer_router_ip_address), 0)
- peer_asn = try(var.peer.peer_asn, null)
- advertised_route_priority = try(var.peer.advertised_route_priority, null)
- bfd = try(var.peer.bfd, null)
- md5_authentication_key = try(var.peer.md5_authentication_key, null)
+ peer_ip_address = element(split("/", google_compute_interconnect_attachment.attachment.customer_router_ip_address), 0)
+ peer_asn = try(var.peer.peer_asn, null)
+ advertised_route_priority = try(var.peer.advertised_route_priority, null)
+ zero_advertised_route_priority = try(var.peer.zero_advertised_route_priority, false)
+ bfd = try(var.peer.bfd, null)
+ md5_authentication_key = try(var.peer.md5_authentication_key, null)
}]
}
diff --git a/modules/interconnect_attachment/metadata.yaml b/modules/interconnect_attachment/metadata.yaml
index 2086397..4cc5f63 100644
--- a/modules/interconnect_attachment/metadata.yaml
+++ b/modules/interconnect_attachment/metadata.yaml
@@ -109,9 +109,10 @@ spec:
description: BGP Peer for this attachment.
varType: |-
object({
- name = string
- peer_asn = string
- advertised_route_priority = optional(number)
+ name = string
+ peer_asn = string
+ advertised_route_priority = optional(number)
+ zero_advertised_route_priority = optional(bool)
bfd = optional(object({
session_initialization_mode = string
min_transmit_interval = optional(number)
diff --git a/modules/interconnect_attachment/variables.tf b/modules/interconnect_attachment/variables.tf
index 269e224..d737809 100644
--- a/modules/interconnect_attachment/variables.tf
+++ b/modules/interconnect_attachment/variables.tf
@@ -117,9 +117,10 @@ variable "interface" {
variable "peer" {
description = "BGP Peer for this attachment."
type = object({
- name = string
- peer_asn = string
- advertised_route_priority = optional(number)
+ name = string
+ peer_asn = string
+ advertised_route_priority = optional(number)
+ zero_advertised_route_priority = optional(bool)
bfd = optional(object({
session_initialization_mode = string
min_transmit_interval = optional(number)