Skip to content

Commit d2a4b47

Browse files
authored
Merge pull request #30 from Niksko/add-iam-permissions
2 parents 1272d4f + 81b9430 commit d2a4b47

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ steps:
192192
- my-custom-plugin#v1.0.0:
193193
```
194194

195-
### AWS ECR specific options
195+
### AWS ECR specific configuration
196196

197197
#### Specifying an ECR repository name
198198

@@ -212,6 +212,34 @@ steps:
212212
- docker#v3.3.0
213213
```
214214

215+
#### Required permissions
216+
217+
Below is a sample set of IAM policy statements that will allow this plugin to work:
218+
219+
```yaml
220+
- Sid: AllowRepositoryActions
221+
Action:
222+
- ecr:BatchCheckLayerAvailability
223+
- ecr:BatchGetImage
224+
- ecr:CompleteLayerUpload
225+
- ecr:CreateRepository
226+
- ecr:DescribeImages
227+
- ecr:DescribeRepositories
228+
- ecr:InitiateLayerUpload
229+
- ecr:PutImage
230+
- ecr:PutLifecyclePolicy
231+
- ecr:SetRepositoryPolicy
232+
- ecr:UploadLayerPart
233+
Effect: Allow
234+
Resource:
235+
- Fn::Sub: arn:aws:ecr:*:${AWS::AccountId}:repository/build-cache/${YourOrganisationSlug}/${YourPipelineSlug}
236+
- Sid: AllowGetAuthorizationToken
237+
Action:
238+
- ecr:GetAuthorizationToken
239+
Resource: "*"
240+
Effect: Allow
241+
```
242+
215243
### GCP GCR specific configuration
216244

217245
[Overview of Google Container Registry](https://cloud.google.com/container-registry/docs/overview)

0 commit comments

Comments
 (0)