Skip to content

Commit 967137b

Browse files
committed
set md5_authentication_key as optional
1 parent c1913e5 commit 967137b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/interface/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ resource "google_compute_router_peer" "peers" {
5050
}
5151

5252
dynamic "md5_authentication_key" {
53-
for_each = lookup(each.value, "md5_authentication_key", null) == null ? [] : [""]
53+
for_each = each.value.md5_authentication_key == null ? [] : [""]
5454
content {
5555
name = each.value.md5_authentication_key.name
5656
key = each.value.md5_authentication_key.key

modules/interface/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ variable "peers" {
6464
min_receive_interval = optional(number)
6565
multiplier = optional(number)
6666
})
67-
md5_authentication_key = object({
67+
md5_authentication_key = optional(object({
6868
name = string
6969
key = string
70-
})
70+
}))
7171
}))
7272
description = "BGP peers for this interface."
7373
default = []

0 commit comments

Comments
 (0)