Skip to content

Commit

Permalink
chore(ci-staging): allow authenticating to ecr public gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Dec 13, 2024
1 parent d8c051b commit d01c787
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions terragrunt/modules/ci-runners/gh_oidc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,23 @@ resource "aws_iam_role" "github_actions_ci_role" {
]
})
}

# Allow GitHub Actions to authenticate to AWS ECR Public Gallery
resource "aws_iam_role_policy" "github_actions_ecr_policy" {
name = "ecr-auth-policy"
role = aws_iam_role.github_actions_ci_role.id

policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Action = [
"ecr-public:GetAuthorizationToken",
"sts:GetServiceBearerToken"
]
Resource = "*"
}
]
})
}

0 comments on commit d01c787

Please sign in to comment.