-
Notifications
You must be signed in to change notification settings - Fork 1
/
group.yml
53 lines (49 loc) · 1.33 KB
/
group.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description: Group and policies related to ECR
Parameters:
ECRrepository:
Description: Name of the repository
Type: String
Resources:
ECRGroup:
Type: AWS::IAM::Group
Properties:
GroupName: ECRGroup
ECRGroupPolicy:
Type: AWS::IAM::Policy
Properties:
PolicyName: ReadWriteECR-the-repository-name
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- ecr:GetDownloadUrlForLayer
- ecr:BatchCheckLayerAvailability
- ecr:PutImage
- ecr:InitiateLayerUpload
- ecr:UploadLayerPart
- ecr:CompleteLayerUpload
- ecr:ListImages
- ecr:BatchGetImage
- ecr:DescribeImages
- ecr:DescribeRepositories
Resource: !Join
- ''
- - 'arn:aws:ecr:'
- !Ref AWS::Region
- ':'
- !Ref AWS::AccountId
- ':repository/'
- !Ref ECRrepository
- Effect: Allow
Action:
- ecr:GetAuthorizationToken
Resource: '*'
Groups:
- !Ref ECRGroup
AddUserToGroup:
Type: AWS::IAM::UserToGroupAddition
Properties:
GroupName: !Ref ECRGroup
Users:
- your.user