File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ module "interface" {
4545 # Peer IP Address must not contain the subnet mask, else will throw an invalid IP address error.
4646 peer_ip_address = element (split (" /" , google_compute_interconnect_attachment. attachment . customer_router_ip_address ), 0 )
4747 peer_asn = var.peer.peer_asn
48- advertised_route_priority = var.peer.advertised_route_priority
49- bfd = var.peer.bfd
50- md5_authentication_key = var.peer.md5_authentication_key
48+ advertised_route_priority = try ( var. peer . advertised_route_priority , null )
49+ bfd = try ( var. peer . bfd , null )
50+ md5_authentication_key = try ( var. peer . md5_authentication_key , null )
5151 }]
5252}
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ resource "google_compute_router_peer" "peers" {
3737 interface = google_compute_router_interface. interface . name
3838 peer_ip_address = each. value . peer_ip_address
3939 peer_asn = each. value . peer_asn
40- advertised_route_priority = lookup (each. value , " advertised_route_priority" , null )
40+ advertised_route_priority = try (each. value . advertised_route_priority , null )
4141
4242 dynamic "bfd" {
43- for_each = lookup (each. value , " bfd" , null ) == null ? [] : [" " ]
43+ for_each = try (each. value . bfd , null ) == null ? [] : [" " ]
4444 content {
4545 session_initialization_mode = try (each. value . bfd . session_initialization_mode , null )
4646 min_receive_interval = try (each. value . bfd . min_receive_interval , null )
@@ -50,7 +50,7 @@ resource "google_compute_router_peer" "peers" {
5050 }
5151
5252 dynamic "md5_authentication_key" {
53- for_each = each. value . md5_authentication_key == null ? [] : [" " ]
53+ for_each = try ( each. value . md5_authentication_key , null ) == null ? [] : [" " ]
5454 content {
5555 name = each. value . md5_authentication_key . name
5656 key = each. value . md5_authentication_key . key
You can’t perform that action at this time.
0 commit comments