-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecr-build.yml
33 lines (31 loc) · 1010 Bytes
/
ecr-build.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
AWSTemplateFormatVersion: "2010-09-09"
Description: "This stack is to spin up a new ECR repository where we can reference it for our ECS stack"
Parameters:
RepoName:
Type: String
Resources:
CfnEcrRepo:
Type: AWS::ECR::Repository
Properties:
RepositoryName: !Ref RepoName
RepositoryPolicyText:
Version: "2012-10-17"
Statement:
-
Sid: AllowPushPull
Effect: Allow
Principal:
AWS:
- !Sub "arn:aws:iam::${AWS::AccountId}:root"
Action:
- "ecr:GetDownloadUrlForLayer"
- "ecr:BatchGetImage"
- "ecr:BatchCheckLayerAvailability"
- "ecr:PutImage"
- "ecr:InitiateLayerUpload"
- "ecr:UploadLayerPart"
- "ecr:CompleteLayerUpload"
Outputs:
EcrRepoUri:
Description: The output stack repo uri to reference for image push and pull commands.
Value: !GetAtt CfnEcrRepo.RepositoryUri