You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enforce team name constraints and fix TG name overflow (#88)
## Summary
- Add team name validation in team provisioner: `^[a-z]{1,12}$`
(lowercase letters only, max 12 chars)
- Rename excluded team references: `platform-owners` → `platform`
everywhere
- Update registered teams: `platform-test-team` → `testteam`
- Fix ALB target group name overflow: truncate + 6-char hash suffix when
>32 chars
- Update app-yaml-reference.md with team constraints and `{team}-{name}`
naming table
## Why
The `{team}-{service}` naming pattern hits AWS limits (ALB TG: 32 chars)
with long team names. This enforces short team names at the provisioner
level and adds a safety truncation in the routing module.
## Files changed
- `terraform/lambda-src/team_provisioner/handler.py` —
`_validate_team_name()` function
- `terraform/lambda-src/ci_broker/handler.py` — excluded team →
`platform`
- `terraform/modules/service-routing/main.tf` — TG name truncation
- `scripts/*.sh`, `scripts/*.py` — excluded team → `platform`
- `.github/CODEOWNERS` — `@javaBin/platform`
- `docs/app-yaml-reference.md` — naming constraints and table
- `terraform/platform/registered-teams.auto.tfvars` — `testteam`
## IAM impact
- Terraform will destroy `javabin-ci-team-platform-test-team` and create
`javabin-ci-team-testteam`
- Same for deploy roles
## Test plan
- [ ] Merge registry PR first (team YAMLs)
- [ ] Merge this PR
- [ ] Verify platform CI passes (plan + apply)
- [ ] Merge test app PR and verify CI uses new team name
Copy file name to clipboardExpand all lines: docs/app-yaml-reference.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,11 +65,13 @@ Used for: ECS service name, ECR repo name, IAM role names, CloudWatch log groups
65
65
66
66
Team that owns this service. Must match a file in `javaBin/registry/teams/`.
67
67
68
+
Team names must be **lowercase letters only** (a-z), no hyphens, digits, or symbols. Max 12 characters. This constraint ensures resource names fit within AWS limits (e.g. ALB target groups: 32 chars).
69
+
68
70
```yaml
69
71
team: core
70
72
```
71
73
72
-
Used for: resource tagging, budget allocation, access control.
74
+
Used for: resource name prefix (`{team}-{service}`), ABAC tagging, budget allocation, access control.
73
75
74
76
### compute
75
77
@@ -361,17 +363,20 @@ Generated files have a `# GENERATED FROM app.yaml` marker. The script only overw
361
363
362
364
## Naming Conventions
363
365
366
+
All app resources are prefixed with the team name for ABAC enforcement.
0 commit comments