Skip to content

Commit

Permalink
fix: Make keys for local.projects consistent (#2516)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
V0idC0de authored Aug 23, 2024
1 parent 7f460c4 commit 548788d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/project-factory/factory-projects.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 548788d

Please sign in to comment.