Skip to content

Commit

Permalink
remove routes list lookup for lans which do not have any routes
Browse files Browse the repository at this point in the history
  • Loading branch information
aimee-889 committed Oct 17, 2023
1 parent 643ef7f commit 4c9bea2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/ionos-datacenter/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ locals {
# ]),
# })
# if no routes_map is provided, a default value of [{}] is given (just empty), to comply with type requirements in further processing
lan_service = flatten([ for id in ionoscloud_lan.service_lan.*.id: { id = id, routes_list = lookup(local.routes_map, id , [{}]) }])
lan_service = flatten([ for id in ionoscloud_lan.service_lan.*.id: { id = id, routes_list = [{}] }])
lan_backend = flatten([ for id in ionoscloud_lan.backend_lan.*.id: { id = id, routes_list = lookup(local.routes_map, id , [{}]) }])
lan_frontend = flatten([ for id in ionoscloud_lan.frontend_lan.*.id: { id = id, routes_list = lookup(local.routes_map, id , [{}]) }])
lan_nfs_server = flatten([ for id in ionoscloud_lan.nfs_server_lan.*.id: { id = id, routes_list = lookup(local.routes_map, id , [{}]) }])
lan_postgres = flatten([ for id in ionoscloud_lan.postgres_lan.*.id: { id = id, routes_list = lookup(local.routes_map, id , [{}]) }])
lan_nfs_server = flatten([ for id in ionoscloud_lan.nfs_server_lan.*.id: { id = id, routes_list = [{}] }])
lan_postgres = flatten([ for id in ionoscloud_lan.postgres_lan.*.id: { id = id, routes_list = [{}] }])
}

0 comments on commit 4c9bea2

Please sign in to comment.