Skip to content

Commit f6423e0

Browse files
authored
feat: Added zero_advertised_route_priority in interconnect_attachment sub-module (#162)
1 parent 60002df commit f6423e0

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

modules/interconnect_attachment/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
| 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 |
1818
| 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 |
1919
| name | The name of the interconnect attachment | `string` | n/a | yes |
20-
| peer | BGP Peer for this attachment. | <pre>object({<br> name = string<br> peer_asn = string<br> advertised_route_priority = optional(number)<br> bfd = optional(object({<br> session_initialization_mode = string<br> min_transmit_interval = optional(number)<br> min_receive_interval = optional(number)<br> multiplier = optional(number)<br> }))<br> md5_authentication_key = optional(object({<br> name = string<br> key = string<br> }))<br> })</pre> | `null` | no |
20+
| peer | BGP Peer for this attachment. | <pre>object({<br> name = string<br> peer_asn = string<br> advertised_route_priority = optional(number)<br> zero_advertised_route_priority = optional(bool)<br> bfd = optional(object({<br> session_initialization_mode = string<br> min_transmit_interval = optional(number)<br> min_receive_interval = optional(number)<br> multiplier = optional(number)<br> }))<br> md5_authentication_key = optional(object({<br> name = string<br> key = string<br> }))<br> })</pre> | `null` | no |
2121
| project | The project ID to deploy to | `string` | n/a | yes |
2222
| region | Region where the attachment resides | `string` | n/a | yes |
2323
| router | Name of the router the attachment resides | `string` | n/a | yes |

modules/interconnect_attachment/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ module "interface" {
4646
name = try(var.peer.name, null)
4747

4848
# Peer IP Address must not contain the subnet mask, else will throw an invalid IP address error.
49-
peer_ip_address = element(split("/", google_compute_interconnect_attachment.attachment.customer_router_ip_address), 0)
50-
peer_asn = try(var.peer.peer_asn, null)
51-
advertised_route_priority = try(var.peer.advertised_route_priority, null)
52-
bfd = try(var.peer.bfd, null)
53-
md5_authentication_key = try(var.peer.md5_authentication_key, null)
49+
peer_ip_address = element(split("/", google_compute_interconnect_attachment.attachment.customer_router_ip_address), 0)
50+
peer_asn = try(var.peer.peer_asn, null)
51+
advertised_route_priority = try(var.peer.advertised_route_priority, null)
52+
zero_advertised_route_priority = try(var.peer.zero_advertised_route_priority, false)
53+
bfd = try(var.peer.bfd, null)
54+
md5_authentication_key = try(var.peer.md5_authentication_key, null)
5455
}]
5556
}
5657

modules/interconnect_attachment/metadata.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ spec:
109109
description: BGP Peer for this attachment.
110110
varType: |-
111111
object({
112-
name = string
113-
peer_asn = string
114-
advertised_route_priority = optional(number)
112+
name = string
113+
peer_asn = string
114+
advertised_route_priority = optional(number)
115+
zero_advertised_route_priority = optional(bool)
115116
bfd = optional(object({
116117
session_initialization_mode = string
117118
min_transmit_interval = optional(number)

modules/interconnect_attachment/variables.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ variable "interface" {
117117
variable "peer" {
118118
description = "BGP Peer for this attachment."
119119
type = object({
120-
name = string
121-
peer_asn = string
122-
advertised_route_priority = optional(number)
120+
name = string
121+
peer_asn = string
122+
advertised_route_priority = optional(number)
123+
zero_advertised_route_priority = optional(bool)
123124
bfd = optional(object({
124125
session_initialization_mode = string
125126
min_transmit_interval = optional(number)

0 commit comments

Comments
 (0)