Allow simple project exclusions in project factory module (#3929)

* docs(cloud-function-v2): remove redundant vpc_connector block in examples

* project factory exclusions for projects

* fix example test

---------

Co-authored-by: Luca Prete <preteluca@gmail.com>
This commit is contained in:
Ludovico Magnocavallo
2026-05-04 15:20:57 +02:00
committed by GitHub
parent 4cf46f2dd9
commit 9540b8d1ae
3 changed files with 24 additions and 3 deletions

View File

@@ -31,7 +31,12 @@ locals {
try(local._templates_raw[v.project_template], {}),
v
)
# apply exclusions
if alltrue([
for x in var.factories_config.exclusions.projects : !startswith(k, x)
])
}
# project data from projects folder
_projects_raw = {
for f in try(fileset(local.paths.projects, "**/*.yaml"), []) :
trimsuffix(f, ".yaml") => yamldecode(file("${local.paths.projects}/${f}"))