Skip to content

Commit 22bbf50

Browse files
committed
feat: manage organization repository topics centrally
Add topics_by_repository to main.tf beside the repository definitions and wire it into github_repository.repositories via the provider-supported inline topics attribute. Topics were audited against live GitHub state on 2026-09-02: stale tags corrected, initial topics added for previously untagged repositories, and factual topics expanded where evidenced.
1 parent 7645137 commit 22bbf50

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

gh-repositories.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ resource "github_repository" "repositories" {
1313
delete_branch_on_merge = true
1414
squash_merge_commit_title = "PR_TITLE"
1515
squash_merge_commit_message = "PR_BODY"
16+
# Topics are declared in main.tf (local.topics_by_repository) next to the
17+
# repository list so every repository's topics live where repositories are
18+
# defined. A missing entry fails the plan; use an explicit empty list for a
19+
# repository that should carry no topics.
20+
topics = local.topics_by_repository[each.key]
1621
lifecycle {
1722
ignore_changes = [
1823
description,

main.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,31 @@ locals {
3131
private_github_repositories = toset([
3232
"agent-knowledge"
3333
])
34+
# Topics are managed for every repository in github_repositories. The
35+
# lookup in gh-repositories.tf is direct, so adding a repository without a
36+
# topics entry fails the plan; a repository intentionally without topics
37+
# declares an explicit empty list. Values audited against live GitHub
38+
# repository topics on 2026-09-02.
39+
topics_by_repository = {
40+
".github" = ["community-health", "github", "org-profile"]
41+
"agent-knowledge" = ["agents", "documentation", "knowledge-base", "opencode"]
42+
"ansible-project-libvirt" = ["ansible-playbooks", "libvirt"]
43+
"ansible-role-crc" = ["ansible", "ansible-role", "crc", "openshift-local"]
44+
"ansible-site-cluster" = ["ansible", "ansible-playbook", "gitops", "ksops", "openshift", "openshift-local"]
45+
"cflan" = ["cloudflare", "dns", "networking", "networkmanager", "python"]
46+
"charts" = ["ghcr", "gitops", "helm", "helm-charts", "oci"]
47+
"images" = ["buildah", "containerfiles", "custom-runners", "github-actions", "opentofu"]
48+
"kustomize-cluster" = ["app-of-apps", "argocd", "gitops", "k3s", "ksops", "kustomize", "sops"]
49+
"shared-workflows" = ["github-actions", "github-workflows", "opentofu", "reusable-workflows", "shared-workflows"]
50+
"terraform-libvirt-domain" = ["cloud-init", "libvirt", "libvirt-provider", "terraform-module"]
51+
"tfroot-aws" = ["aws-provider", "kms", "opentofu", "s3-backend", "sops", "tfstate"]
52+
"tfroot-cloudflare" = ["cloudflare", "cloudflare-access", "cloudflare-tunnel", "opentofu", "s3-backend", "sops", "tfstate"]
53+
"tfroot-gcp" = ["gcp", "gcs-backend", "kms", "opentofu", "sops", "tfstate", "workload-identity-federation"]
54+
"tfroot-github" = ["github-actions", "opentofu", "s3-backend", "sops", "tfstate", "terraform-provider-github"]
55+
"tfroot-libvirt" = ["cloud-init", "k3s", "libvirt", "libvirt-provider", "opentofu", "s3-backend", "sops", "tfstate"]
56+
"tfroot-namecheap" = ["cloudflare", "dns", "domains", "namecheap", "opentofu"]
57+
"www" = ["cloudflare", "css", "html", "pwa", "s3", "static-site"]
58+
}
3459
relaxed_branch_protection_github_repositories = toset([
3560
"agent-knowledge"
3661
])

0 commit comments

Comments
 (0)