Skip to content

feat(cli): make ecr images immutable when created from cdk bootstrap#19937

Merged
mergify[bot] merged 3 commits intoaws:masterfrom
Hi-Fi:feat/immutable_ecr
May 17, 2022
Merged

feat(cli): make ecr images immutable when created from cdk bootstrap#19937
mergify[bot] merged 3 commits intoaws:masterfrom
Hi-Fi:feat/immutable_ecr

Conversation

@Hi-Fi
Copy link
Copy Markdown
Contributor

@Hi-Fi Hi-Fi commented Apr 15, 2022

As CDK creates images always with different name/tag, it can be ensured that those are not changed at the repository side.

Changes default functionality without offering immutability setting

AWS::ECR::Repository.ImageTagMutability

Fixes #18376


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Apr 15, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team April 15, 2022 15:53
@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 labels Apr 15, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 15, 2022

@gitpod-io[bot] is not allowed to run commands

@Hi-Fi
Copy link
Copy Markdown
Contributor Author

Hi-Fi commented Apr 15, 2022

@rix0rrr I think this is what was described in the issue?

@Hi-Fi Hi-Fi force-pushed the feat/immutable_ecr branch 6 times, most recently from ffe9689 to 5e9c923 Compare April 25, 2022 07:08
Copy link
Copy Markdown
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! We just need a test for this change.

@Hi-Fi Hi-Fi force-pushed the feat/immutable_ecr branch from 5e9c923 to 069ccca Compare April 30, 2022 08:49
@mergify mergify bot dismissed TheRealAmazonKendra’s stale review April 30, 2022 08:49

Pull request has been modified.

@Hi-Fi
Copy link
Copy Markdown
Contributor Author

Hi-Fi commented Apr 30, 2022

Thanks for the contribution! We just need a test for this change.

Added new test to verify the IMMUTABLE, and ran it locally to see that it works as should.

@Hi-Fi Hi-Fi force-pushed the feat/immutable_ecr branch 4 times, most recently from ea763a9 to 753b550 Compare May 6, 2022 18:37
@Hi-Fi Hi-Fi force-pushed the feat/immutable_ecr branch 4 times, most recently from c460354 to ebdf324 Compare May 13, 2022 17:56
Hi-Fi added 2 commits May 16, 2022 06:56
As CDK creates images always with different name/tag, it can be ensured that those are not changed at the repository side
@Hi-Fi Hi-Fi force-pushed the feat/immutable_ecr branch from ebdf324 to b27daa9 Compare May 16, 2022 03:56
@Hi-Fi
Copy link
Copy Markdown
Contributor Author

Hi-Fi commented May 16, 2022

@TheRealAmazonKendra Is there something that needs to be changed in PR?

@TheRealAmazonKendra TheRealAmazonKendra changed the title feat(bootstrap): Bootstrap ECR repo with IMMUTABLE images feat(cli): make ecr images immutable when created from cdk bootstrap May 17, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented May 17, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: cf22702
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 0ef4bb4 into aws:master May 17, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented May 17, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@Hi-Fi Hi-Fi deleted the feat/immutable_ecr branch May 17, 2022 03:36
wphilipw pushed a commit to wphilipw/aws-cdk that referenced this pull request May 23, 2022
…ws#19937)

As CDK creates images always with different name/tag, it can be ensured that those are not changed at the repository side.

Changes default functionality without offering immutability setting

[`AWS::ECR::Repository.ImageTagMutability`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-imagetagmutability)

Fixes aws#18376

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(bootstrap): Allow to enable tag immutability in ECR repos

3 participants