manage IUCLabs GitHub organisation #118
Reference in New Issue
Block a user
Delete Branch "benvin/github-iuclabs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The IUCLabs GitHub organisation needs the same declarative YAML management as Gitea, without Gitea runs needing GitHub creds.
modules/github_org: validates config, callsteamandrepositorysubmodulesrepositoryowns the repo, default branch, collaborators, CODEOWNERS and rulesets (viaruleset)ruleset/adds custom onesmaintodefault_branchenvironments/github/iuclabs; GitHub App creds from Vault in a subshellmake plan/apply/apply-if-changesconfig/github.com/out of Gitea inputs; addmake testto pre-commitplanstep → export GITHUB_* only when running the github unit (or split into a separate target/step), and keep Gitea plan independent of the GitHub secret.terragrunt run --allnow includes environments/github/iuclabs, so a GitHub-side failure blocks Gitea applies → merge only after the terraform-vault PR is applied and plan is green, or exclude the github unit from the Gitea run.team.key,trimprefix(e, "@")), which breaks for names with caps/spaces → usegithub_team.this[...].slug.github_repository_file.codeownersfails onauto_init = falserepos (no branch to commit to) → validateauto_initwhenmaintainersis set, or skip the file.run_cmdvault calls are evaluated at parse time, and the Makefile runsterragrunt run --allfor init/plan/apply, so a vault failure or missing read policy onkv/service/github/iuclabs/terraformaborts the whole run including au/syd1 → fetch the secrets outside HCL (Makefile github-only target exportingGITHUB_APP_*) so au/syd1 has no dependency on it, or exclude the github unit from the Gitea targets.terraform.extra_arguments.env_vars, soterragrunt render --json(and any config dump) prints the PEM → keep the secret out of terragrunt config; same fix as above.provider.tfandbackend.tfshrinks, so the generated files differ from main → acceptable only if intended; otherwise keep them inbackend.tf.archive_on_destroy = true.rulesetsfails atvar.ruleset[rs]with an opaque index error → add a validation that everyrulesetsentry exists invar.ruleset.No findings.
github_branch_defaultwithdefault_branch!=mainfails apply:auto_initonly createsmainandrenameis not set → setrename = true(or validate default_branch == "main").target = "tag"pluspull_request/required_status_checks, orrequired_status_checks.contexts = [], passes plan but GitHub rejects it (422) at apply → add a validation for both cases.No findings.
unkin-agent referenced this pull request2026-11-10 22:17:03 +11:00
@teaminmaintainers/codeownersthat is not a key ofvar.teamfails with an opaque "Invalid index" onmodule.team[...]→ add arepositoryvalidation in variables.tf listing unknown teams (as done for rulesets) plus aexpect_failurestest.idoutput is consumed nowhere → drop it.No findings.