Skip to content

Commit

Permalink
Set up new private perms
Browse files Browse the repository at this point in the history
  • Loading branch information
svevang committed Sep 13, 2024
1 parent 52b986b commit cf415f0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions iam-roles/PRX-GHA-AccessRole/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Resources:
- !Ref SesMailSendPolicy
- !Ref PassCloudFormationRolePolicy
- !Ref EcrPublicPushPolicy
- !Ref PrivateEcrPushPolicy
RoleName: PRX-GHA-AccessRole
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
Expand Down Expand Up @@ -162,3 +163,27 @@ Resources:
Resource: "*"
Sid: AllowEcrPublicRepoImagePush
Version: "2012-10-17"

# GH actions push to private ECR repos
PrivateEcrPushPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
Description: Allows pushing Docker images to private ECR repositories
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- ecr:GetAuthorizationToken
- ecr:BatchCheckLayerAvailability
- ecr:GetDownloadUrlForLayer
- ecr:GetRepositoryPolicy
- ecr:DescribeRepositories
- ecr:ListImages
- ecr:DescribeImages
- ecr:BatchGetImage
- ecr:InitiateLayerUpload
- ecr:UploadLayerPart
- ecr:CompleteLayerUpload
- ecr:PutImage
Resource: "*"

0 comments on commit cf415f0

Please sign in to comment.