Skip to content

fix: skip empty label resource blocks#25

Merged
xMoelletschi merged 1 commit intomasterfrom
skip-empty-label-blocks
Mar 2, 2026
Merged

fix: skip empty label resource blocks#25
xMoelletschi merged 1 commit intomasterfrom
skip-empty-label-blocks

Conversation

@xMoelletschi
Copy link
Copy Markdown
Owner

@xMoelletschi xMoelletschi commented Mar 2, 2026

Summary

  • Groups and projects with zero labels no longer generate resource "gitlab_group_label" / resource "gitlab_project_label" blocks in per-namespace files
  • Variable files (group_labels.tf, project_labels.tf) no longer include empty "path" = {} entries for groups/projects without labels

Test plan

  • go build ./... passes
  • go test -race ./... passes
  • Manual: run scan against a GitLab instance — only groups/projects with actual labels should have resource blocks

Groups and projects with zero labels no longer get unnecessary
resource blocks or empty variable entries in the generated terraform.
@xMoelletschi xMoelletschi merged commit dc04a77 into master Mar 2, 2026
3 checks passed
@xMoelletschi xMoelletschi deleted the skip-empty-label-blocks branch March 2, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant