Pathexpand all factory data paths (#3033)
* Pathexpand all factory data paths * fix net monitoring paths * fix file paths --------- Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
@@ -15,11 +15,12 @@
|
||||
*/
|
||||
|
||||
locals {
|
||||
prefix = var.prefix == null || var.prefix == "" ? "" : "${var.prefix}_"
|
||||
prefix = var.prefix == null || var.prefix == "" ? "" : "${var.prefix}_"
|
||||
_factory_listings_path = pathexpand(coalesce(var.factories_config.listings, "-"))
|
||||
_factory_listings = {
|
||||
for f in try(fileset(var.factories_config.listings, "*.yaml"), []) :
|
||||
for f in try(fileset(local._factory_listings_path, "*.yaml"), []) :
|
||||
trimsuffix(f, ".yaml") => yamldecode(
|
||||
file("${var.factories_config.listings}/${f}")
|
||||
file("${local._factory_listings_path}/${f}")
|
||||
)
|
||||
}
|
||||
factory_listings = merge(local._factory_listings, var.listings)
|
||||
|
||||
Reference in New Issue
Block a user