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:
@@ -17,10 +17,11 @@
|
||||
# tfdoc:file:description IAM bindings.
|
||||
|
||||
locals {
|
||||
_custom_roles_path = pathexpand(coalesce(var.factories_config.custom_roles, "-"))
|
||||
_custom_roles = {
|
||||
for f in try(fileset(var.factories_config.custom_roles, "*.yaml"), []) :
|
||||
for f in try(fileset(local._custom_roles_path, "*.yaml"), []) :
|
||||
replace(f, ".yaml", "") => yamldecode(
|
||||
file("${var.factories_config.custom_roles}/${f}")
|
||||
file("${local._custom_roles_path}/${f}")
|
||||
)
|
||||
}
|
||||
_iam_principal_roles = distinct(flatten(values(var.iam_by_principals)))
|
||||
|
||||
Reference in New Issue
Block a user