Skip to content
Closed
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
16 changes: 16 additions & 0 deletions iam-roles/PRX-GHA-AccessRole/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Resources:
- !Ref EcrPublicPushPolicy
- !Ref PrivateEcrPushPolicy
- !Ref SsmParameterPutPolicy
- !Ref SsmParameterGetDockerHubPolicy
- !Ref AssumeRolePolicy
RoleName: PRX-GHA-AccessRole
Tags:
Expand Down Expand Up @@ -199,6 +200,21 @@ Resources:
- ssm:PutParameter
Resource: "arn:aws:ssm:*:*:parameter/*/pkg/docker-image-tag"

# GH actions need Docker Hub credentials to avoid rate limits
SsmParameterGetDockerHubPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
Description: Allows reading Docker Hub credentials from SSM
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- ssm:GetParameter
Resource:
- "arn:aws:ssm:*:*:parameter/prx/DOCKERHUB_USERNAME"
- "arn:aws:ssm:*:*:parameter/prx/DOCKERHUB_PASSWORD"

# GH actions may need more permissions than we are willing to grant to this
# role, so we allow this role to assume some other roles. The assumed role
# **MUST** be tagged with PRX-GHA-AccessRole=AssumeRole. Roles that may
Expand Down