(ecr): setting imageScanOnPush to false doesn't update Repository after first being set to true #18077
Labels
@aws-cdk/aws-ecr
Related to Amazon Elastic Container Registry
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
What is the problem?
Setting imageScanOnPush to false sets the property on the underlying CfnRepository to
undefined
aws-cdk/packages/@aws-cdk/aws-ecr/lib/repository.ts
Lines 484 to 491 in dd5e12d
This is fine when creating the Repository because the default setting is to set this to false. However, it appears this is only the default setting for creating the repository - not the default setting for updating the repository.
Reproduction Steps
First create a new ECR Repository with imageScanOnPush set to true
Then update that setting to false and deploy
What did you expect to happen?
ScanOnPush to be set to false in AWS console
What actually happened?
ScanOnPush is still set to true
CDK CLI Version
2.2.0
Framework Version
No response
Node.js Version
16.0.0
OS
Mac
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: