From 548788dba17a8ee3480d7761aed01a6532af6531 Mon Sep 17 00:00:00 2001 From: V0idC0de <26016825+V0idC0de@users.noreply.github.com> Date: Fri, 23 Aug 2024 17:47:51 +0200 Subject: [PATCH] fix: Make keys for local.projects consistent (#2516) Projects configured in `folders_data_path` have their filename as key, whereas those from `projects_data_path` have their path, relative to `projects_data_path` as key. This causes different behavior when defining `local.projects` and subsequently calling `module.projects`, unless `name` is specified. --- modules/project-factory/factory-projects.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project-factory/factory-projects.tf b/modules/project-factory/factory-projects.tf index 17e1add5ce..3cb1c3d843 100644 --- a/modules/project-factory/factory-projects.tf +++ b/modules/project-factory/factory-projects.tf @@ -31,7 +31,7 @@ locals { _projects = merge( { for f in try(fileset(local._project_path, "**/*.yaml"), []) : - trimsuffix(f, ".yaml") => yamldecode(file("${local._project_path}/${f}")) + basename(trimsuffix(f, ".yaml")) => yamldecode(file("${local._project_path}/${f}")) }, local._hierarchy_projects )