-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(ecr): make enableAutoDeleteImages method public
#36246
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
base: main
Are you sure you want to change the base?
feat(ecr): make enableAutoDeleteImages method public
#36246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter fails with the following errors:
❌ Features must contain a change to a test file.
❌ Features must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
enableAutoDeleteImages method publicenableAutoDeleteImages method public
|
||||||||||||||
|
||||||||||||||
Issue # (if applicable)
none
Reason for this change
The functionality that enables the deletion of all images within an ECR Repository when the CDK stack is destroyed (configured via the
emptyOnDelete,autoDeleteImagesproperty) is currently only settable through theRepositoryPropsconstructor. This requires users to decide on the image cleanup behavior at the time of resource creation.The use case for this change is to enable users to activate this capability after the repository has been created (e.g., inside an aspect, a custom method, or dynamically based on conditions), by exposing the internal logic through a public method.
Description of changes
The private method
enableAutoDeleteImages()was changed to publicDescribe any new or updated permissions being added
none
Description of how you validated changes
Add unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license