Wire AWS ECS Staging Deployment for Buyer Agent - #113
Open
Sirajmx wants to merge 4 commits into
Open
Conversation
…rfile deploy.yml: - Fix ECR_REPOSITORY, ECS_CLUSTER, ECS_SERVICE to match Terraform resource names (add missing 'system-' prefix and env-scoped ECR path) - Pass GH_PAT secret to docker build for private iab-agentic-primitives dep Dockerfile: - Add git to builder apt deps (needed for VCS pip install) - Use BuildKit --mount=type=secret for GitHub token; token never written to any image layer (GIT_CONFIG_COUNT env-var approach, no gitconfig file) - Runtime stage: --no-deps on pip install avoids re-cloning git deps (all deps already resolved in the copied venv from builder) Terraform: - Add github_oidc.tf: OIDC provider + scoped IAM deploy role for GitHub Actions (ECR push + ECS update-service); after apply, set output github_deploy_role_arn as AWS_DEPLOY_ROLE_ARN in repo secrets - Expose ecr_repository_arn and ecs_cluster_arn from compute module so the OIDC policy can reference them without hardcoding ARN strings
Collaborator
|
Deploy verified working — thanks @Sirajmx. Holding the merge on an internal hosting decision (which environment the official staging instance lives in); being handled off-thread. Code-wise this is ready. |
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
(ad-buyer-system/{environment} pattern). Deployment now triggers on push to main only.
--mount=type=secret,id=github_token to authenticate private iab-agentic-primitives git dependency without baking credentials
into any image layer.
role (ad-buyer-system-github-deploy) with least-privilege ECR push + ECS update permissions. No static AWS credentials stored in
GitHub.
ecr_repository_arn and ecs_cluster_arn outputs to wire the OIDC role's IAM conditions.
Infrastructure provisioned (Terraform apply, 54 resources)
GitHub secrets required
Test plan