From f9ce81ab20cd728ac357f7f5c7801268683a4b44 Mon Sep 17 00:00:00 2001 From: Stefano Sibilia Date: Fri, 3 Oct 2025 10:25:06 +0200 Subject: [PATCH] refs sparkfabrik-innovation-team/board#3833: Update parent group data source logic for project creation and auto-detection --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 175f0c9..fc7b82a 100644 --- a/main.tf +++ b/main.tf @@ -65,9 +65,9 @@ data "gitlab_group" "root_namespace" { full_path = local.project_root_namespace } -# Data source for parent group when auto-detecting +# Data source for parent group (used for project creation when not at root level, and for auto-detect mode) data "gitlab_group" "parent_group" { - count = local.auto_detect_parent ? 1 : 0 + count = !var.operate_at_root_group_level && local.parent_group_path != "" ? 1 : 0 full_path = local.parent_group_path }