Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -15,7 +15,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> })</pre> | 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> | n/a | yes |
| 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
1 change: 1 addition & 0 deletions modules/interconnect_attachment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ module "interface" {
peer_asn = var.peer.peer_asn
advertised_route_priority = lookup(var.peer, "advertised_route_priority", null)
bfd = lookup(var.peer, "bfd", null)
md5_authentication_key = lookup(var.peer, "md5_authentication_key", null)
}]
}
4 changes: 4 additions & 0 deletions modules/interconnect_attachment/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,9 @@ variable "peer" {
min_receive_interval = optional(number)
multiplier = optional(number)
}))
md5_authentication_key = optional(object({
name = string
key = string
}))
})
}
2 changes: 1 addition & 1 deletion modules/interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| interconnect\_attachment | The name or resource link to the VLAN interconnect for this interface | `string` | `null` | no |
| ip\_range | IP address and range of the interface | `string` | `null` | no |
| name | The name of the interface | `string` | n/a | yes |
| peers | BGP peers for this interface. | <pre>list(object({<br> name = string<br> peer_ip_address = string<br> peer_asn = string<br> advertised_route_priority = optional(number)<br> bfd = object({<br> session_initialization_mode = string<br> min_transmit_interval = optional(number)<br> min_receive_interval = optional(number)<br> multiplier = optional(number)<br> })<br> }))</pre> | `[]` | no |
| peers | BGP peers for this interface. | <pre>list(object({<br> name = string<br> peer_ip_address = string<br> peer_asn = string<br> advertised_route_priority = optional(number)<br> bfd = 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 = object({<br> name = string<br> key = string<br> })<br> }))</pre> | `[]` | no |
| project | The project ID to deploy to | `string` | n/a | yes |
| region | Region where the interface resides | `string` | n/a | yes |
| router | Name of the router the interface resides | `string` | n/a | yes |
Expand Down
8 changes: 8 additions & 0 deletions modules/interface/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ resource "google_compute_router_peer" "peers" {
multiplier = try(each.value.bfd.multiplier, null)
}
}

dynamic "md5_authentication_key" {
for_each = lookup(each.value, "md5_authentication_key", null) == null ? [] : [""]
content {
name = each.value.md5_authentication_key.name
key = each.value.md5_authentication_key.key
}
}
}
4 changes: 4 additions & 0 deletions modules/interface/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ variable "peers" {
min_receive_interval = optional(number)
multiplier = optional(number)
})
md5_authentication_key = object({
name = string
key = string
})
}))
description = "BGP peers for this interface."
default = []
Expand Down