Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ecr): set correct resource policy for ecr repository #3590

Merged
merged 5 commits into from
Aug 19, 2019

Conversation

SanderKnape
Copy link

Fixes #3583. Adding Resource: "*" to an ECR repository policy gives the error "Invalid parameter at 'PolicyText'". According to the documentation, a proper ECR repository policy doesn't have this property. This PR removes that property.


Please read the contribution guidelines and follow the pull-request checklist.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

This fixes the aws-ecr-assets test where an IAM user receives the policy instead of the ECR repository.
"Resource": "*",
"Resource": {
"Fn::GetAtt": [
"TestHarnessRepoAA7E9724",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't work though. Will lead to a dependency cycle, as this is the GetAtt of the repository that is currently being created. Try resourceSelfArns: [].

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, I'll look into a proper fix.

@rix0rrr rix0rrr self-assigned this Aug 9, 2019
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment.

@SanderKnape
Copy link
Author

@rix0rrr I've implemented the change, should be good now 👍

@eladb eladb requested a review from rix0rrr August 14, 2019 11:58
@mergify
Copy link
Contributor

mergify bot commented Aug 19, 2019

Thank you for contributing! Your pull request is now being automatically merged.

@mergify
Copy link
Contributor

mergify bot commented Aug 19, 2019

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit 30f3968 into aws:master Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to grantPull permission ECR repository (may be bug in doc)
3 participants