Auto-sync repos from GitHub teams, auto-generate TF boilerplate, drop CDK#69
Merged
Conversation
… CDK Registration: - Add sync-registered-repos.py: queries GitHub teams for repos, writes registered-apps.auto.tfvars (replaces manual list) - Platform CI runs sync before every plan + supports manual dispatch - Add organization:read permission for GitHub team API access App repo boilerplate: - Add ensure-tf-boilerplate.sh: auto-generates backend.tf (S3 state) and providers.tf (with default_tags for project/team/managed-by) when repos don't have app.yaml - Resolves team from GitHub API at CI runtime - Won't overwrite existing files CDK: - Remove CDK detection from detect.yml (not supported in pipeline)
711c69a to
6ca2cfc
Compare
organization is not a valid GITHUB_TOKEN permission scope. Also scope repo sync to main branch only (not needed on PRs).
Terraform Plan🚧 Changes detected — Plan: 4 to add, 0 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Adding ALB integration for the password-set Lambda function via a new listener rule, target group, and permissions.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
… CDK (#69) ## Summary - **Replace manual `registered_app_repos`** — `sync-registered-repos.py` queries GitHub teams for repos and writes `registered-apps.auto.tfvars`. Runs pre-plan in platform CI. Manual trigger via `workflow_dispatch`. - **Auto-generate backend.tf + providers.tf** — `ensure-tf-boilerplate.sh` generates S3 backend and provider with `default_tags` (project, team, managed-by) for repos without app.yaml. Resolves team from GitHub API. Won't overwrite existing files. - **Drop CDK** — Remove `has_cdk` detection from `detect.yml` (not supported in pipeline) - **Presentation docs** — 7 markdown files covering the full platform for board presentation ## Key design decisions - **GitHub team membership is the source of truth** for which repos get CI roles. No manual lists. - **Auto-tagging via `default_tags`** ensures all resources are tagged even without app.yaml. Combined with ABAC `aws:RequestTag/project` on the CI role, untagged resource creation is blocked. - **Non-destructive boilerplate** — existing backend.tf/providers.tf are never overwritten. ## Test plan - [ ] Verify `sync-registered-repos.py` correctly lists repos from GitHub teams - [ ] Verify `ensure-tf-boilerplate.sh` generates correct backend.tf + providers.tf - [ ] Verify boilerplate is skipped when files already exist - [ ] Verify CDK detection removed from detect.yml - [ ] Run platform CI and confirm sync step runs before plan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
registered_app_repos—sync-registered-repos.pyqueries GitHub teams for repos and writesregistered-apps.auto.tfvars. Runs pre-plan in platform CI. Manual trigger viaworkflow_dispatch.ensure-tf-boilerplate.shgenerates S3 backend and provider withdefault_tags(project, team, managed-by) for repos without app.yaml. Resolves team from GitHub API. Won't overwrite existing files.has_cdkdetection fromdetect.yml(not supported in pipeline)Key design decisions
default_tagsensures all resources are tagged even without app.yaml. Combined with ABACaws:RequestTag/projecton the CI role, untagged resource creation is blocked.Test plan
sync-registered-repos.pycorrectly lists repos from GitHub teamsensure-tf-boilerplate.shgenerates correct backend.tf + providers.tf