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:
@@ -16,12 +16,13 @@
|
||||
|
||||
locals {
|
||||
# descriptive_name cannot contain colons, so we omit the universe from the default
|
||||
_observability_factory_path = pathexpand(coalesce(var.factories_config.observability, "-"))
|
||||
descriptive_name = (
|
||||
var.descriptive_name != null ? var.descriptive_name : "${local.prefix}${var.name}"
|
||||
)
|
||||
observability_factory_data_raw = [
|
||||
for f in try(fileset(var.factories_config.observability, "*.yaml"), []) :
|
||||
yamldecode(file("${var.factories_config.observability}/${f}"))
|
||||
for f in try(fileset(local._observability_factory_path, "*.yaml"), []) :
|
||||
yamldecode(file("${local._observability_factory_path}/${f}"))
|
||||
]
|
||||
parent_type = var.parent == null ? null : split("/", var.parent)[0]
|
||||
parent_id = var.parent == null ? null : split("/", var.parent)[1]
|
||||
|
||||
Reference in New Issue
Block a user