Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/platform-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ jobs:
terraform_version: "1.7"
terraform_wrapper: false

# Pinned to v5 — v6 breaks OIDC AssumeRoleWithWebIdentity for this role
- uses: aws-actions/configure-aws-credentials@v5
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/javabin-ci-infra
aws-region: ${{ env.AWS_REGION }}
Expand Down Expand Up @@ -201,8 +200,7 @@ jobs:
terraform_version: "1.7"
terraform_wrapper: false

# Pinned to v5 — v6 breaks OIDC AssumeRoleWithWebIdentity for this role
- uses: aws-actions/configure-aws-credentials@v5
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/javabin-ci-infra
aws-region: ${{ env.AWS_REGION }}
Expand Down
9 changes: 7 additions & 2 deletions terraform/platform/iam/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ resource "aws_iam_role" "ci_infra" {
"token.actions.githubusercontent.com:aud" = "sts.amazonaws.com"
}
StringLike = {
# Main branch ONLY — apply never runs on PRs
"token.actions.githubusercontent.com:sub" = "repo:${var.github_org}/platform:ref:refs/heads/main"
# Main branch OR production environment — the apply job uses
# `environment: production`, which changes the OIDC sub claim
# from ref-based to environment-based.
"token.actions.githubusercontent.com:sub" = [
"repo:${var.github_org}/platform:ref:refs/heads/main",
"repo:${var.github_org}/platform:environment:production",
]
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion terraform/platform/lambdas/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ resource "aws_iam_role_policy_attachment" "team_provisioner_logs" {

# --- password-set role ---
resource "aws_iam_role" "password_set" {
name = "${var.project}-password-set"
name = "${var.project}-password-set"
permissions_boundary = "arn:aws:iam::${var.aws_account_id}:policy/${var.project}-developer-boundary"

assume_role_policy = jsonencode({
Version = "2012-10-17"
Expand Down