Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/interconnect_attachment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | <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 |
| 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 |
| 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 |
Expand Down
11 changes: 6 additions & 5 deletions modules/interconnect_attachment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}]
}

Expand Down
7 changes: 4 additions & 3 deletions modules/interconnect_attachment/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions modules/interconnect_attachment/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down