Construct boundary ARN instead of data source lookup#94
Merged
Conversation
The boundary policy is tagged team=javabin (org default), not shared.
Instead of looking it up via iam:GetPolicy (which the cross-team deny
blocks), construct the deterministic ARN from the account ID and project.
- Remove data source from platform-data module
- Use expr:arn:aws:iam::${env:AWS_ACCOUNT_ID}:policy/... in registry
- Revert boundary.tf tags override (org default_tags are correct)
Terraform Plan✅ No changes — infrastructure is up to date. Plan output |
2 tasks
Alexanderamiri
added a commit
that referenced
this pull request
Mar 18, 2026
## Summary
The apply gate Lambda used the old per-app role pattern
(`javabin-ci-app-{repo}`). Updated to resolve team from GitHub API (same
as the CI broker) and assume `javabin-ci-team-{team}`.
Also includes the boundary ARN construction fix from PR #94.
### Changes
- **`shared/github.py`**: Extracted GitHub App auth + team resolution
from ci_broker into shared module
- **`ci_broker/handler.py`**: Uses `shared.github.resolve_team()`
instead of inline copy
- **`apply_gate/handler.py`**: Uses `shared.github.resolve_team()` to
find team, assumes `javabin-ci-team-{team}`
- **`lambdas/main.tf`**: Added SSM read for GitHub App creds to gate
role. Switched ci_broker + apply_gate archives to `source{}` blocks to
include shared module.
- **`registry.py`** + **`platform-data/main.tf`**: Construct boundary
ARN instead of data source
## Test plan
- [ ] Merge, wait for apply (deploys updated Lambdas)
- [ ] Retrigger test app CI — apply gate should resolve team and assume
correct role
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary
The boundary policy has `team=javabin` from org default_tags. The
`DenyCrossTeamAccess` deny blocks `iam:GetPolicy` on it.
Instead of tagging it shared (wrong semantics), construct the
deterministic ARN:
`arn:aws:iam::{account_id}:policy/javabin-developer-boundary`. Zero IAM
API calls.
## Test plan
- [ ] Merge, wait for apply, retrigger test app CI
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary
The apply gate Lambda used the old per-app role pattern
(`javabin-ci-app-{repo}`). Updated to resolve team from GitHub API (same
as the CI broker) and assume `javabin-ci-team-{team}`.
Also includes the boundary ARN construction fix from PR #94.
### Changes
- **`shared/github.py`**: Extracted GitHub App auth + team resolution
from ci_broker into shared module
- **`ci_broker/handler.py`**: Uses `shared.github.resolve_team()`
instead of inline copy
- **`apply_gate/handler.py`**: Uses `shared.github.resolve_team()` to
find team, assumes `javabin-ci-team-{team}`
- **`lambdas/main.tf`**: Added SSM read for GitHub App creds to gate
role. Switched ci_broker + apply_gate archives to `source{}` blocks to
include shared module.
- **`registry.py`** + **`platform-data/main.tf`**: Construct boundary
ARN instead of data source
## Test plan
- [ ] Merge, wait for apply (deploys updated Lambdas)
- [ ] Retrigger test app CI — apply gate should resolve team and assume
correct role
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
The boundary policy has
team=javabinfrom org default_tags. TheDenyCrossTeamAccessdeny blocksiam:GetPolicyon it.Instead of tagging it shared (wrong semantics), construct the deterministic ARN:
arn:aws:iam::{account_id}:policy/javabin-developer-boundary. Zero IAM API calls.Test plan