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

aws-ecr: support create ECR repository with scanOnPush enabled #4979

Closed
1 of 2 tasks
pahud opened this issue Nov 12, 2019 · 4 comments
Closed
1 of 2 tasks

aws-ecr: support create ECR repository with scanOnPush enabled #4979

pahud opened this issue Nov 12, 2019 · 4 comments
Assignees
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md

Comments

@pahud
Copy link
Contributor

pahud commented Nov 12, 2019

The scanOnPush is not supported in cloudformation yet. We probably can use custom-resources construct lib to enable it when creating the ECR repository.

Use Case

It's very helpful if aws-ecr can create the repository with the scanOnPush activated.

Proposed Solution

As cloudformation has yet to support this in AWS::ECR::Repository, I was thinking mayabe we can implement it with custom-resources so we can eventually create the repo like this

const repo = new ecr.Repository(stack, 'Repo');
repo.addScanOnPush();

or just

const repo = new ecr.Repository(stack, 'Repo', {
   scanOnPush: true
});

However, custom-resources/lib/aws-custom-resource/runtime is running on Lambda NodeJS runtime with current AWS SDK VERSION: 2.488.0 while this feature requires aws-sdk-js >= 2.557.0.

I think we should enable this before the cloudformation native support but I am not sure what we can do.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@pahud pahud added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 12, 2019
@SomayaB SomayaB added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Nov 12, 2019
@pahud pahud mentioned this issue Nov 13, 2019
2 tasks
@rix0rrr rix0rrr added the good first issue Related to contributions. See CONTRIBUTING.md label Dec 2, 2019
@rix0rrr rix0rrr assigned MrArnoldPalmer and unassigned rix0rrr Jan 23, 2020
@MrArnoldPalmer MrArnoldPalmer added the effort/medium Medium work item – several days of effort label Feb 12, 2020
@Lasim
Copy link

Lasim commented Feb 27, 2020

Any updates?

@MrArnoldPalmer
Copy link
Contributor

Cfn still doesn't support this out of the box. There is no one on the core team working on the custom resource currently. Add a 👍 to the issue if this is important to you as that helps us to prioritize. PRs are always welcome as well.

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Mar 4, 2020
winky added a commit to winky/aws-cdk that referenced this issue May 4, 2020
Support scanOnPush option to ecr repository. Cfn still does not support this out of the box, so we use custom resource.

Closes aws#4979
@winky
Copy link
Contributor

winky commented May 5, 2020

I think this Issue can be closed by #7471.

@pahud
Copy link
Contributor Author

pahud commented May 5, 2020

@winky Yes it's already been shipped.

@pahud pahud closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md
Projects
None yet
Development

No branches or pull requests

6 participants