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

feat(ecr): configure immutable tags for ecr repo #11954

Closed

Conversation

captainrandom
Copy link

@captainrandom captainrandom commented Dec 9, 2020

When creating an ecr repo allow tags to be immutable by setting the ImageTagMutability field found here:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-imagetagmutability

Trying to get the minor version bump script to work at the moment.


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

gitpod-io bot commented Dec 9, 2020

@mergify
Copy link
Contributor

mergify bot commented Dec 9, 2020

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@captainrandom captainrandom force-pushed the feature/ecr-allow-immutable-tags branch from dc4a6a7 to 0567ff2 Compare December 9, 2020 08:27
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 4ad87f2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@captainrandom
Copy link
Author

Broader question: should the imageTagImmutable property be a boolean or should it be a string?

@SomayaB SomayaB changed the title [ECR] configure immutable tags for ecr repo feat(ecr): configure immutable tags for ecr repo Dec 10, 2020
@github-actions github-actions bot added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Dec 10, 2020
Copy link
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

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

The following files have unnecessary changes. Would appreciate if you could clean these up.

You can do yarn install --frozen-lockfile to install without upgrading versions in yarn.lock.

.github/actions/prlinter/package.json
packages/cdk/package.json
packages/decdk/test/fixture/package.json
tools/yarn-cling/test/test-fixture/package1/package.json
tools/yarn-cling/test/test-fixture/package2/package.json
yarn.lock

/**
* Enable image tag references to be mutable
*
* @default true
Copy link
Contributor

Choose a reason for hiding this comment

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

The default for this is actually false right? When you pass undefined to the L1, then the default value is MUTABLE as documented here

Copy link
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

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

Actually I believe that the name of this property should be imageTagMutability to match the underlying L1 and the type should be an Enum. Even though there are only two options this feels like the best balance between safety and verbosity. The users of the L2 don't need to know to put 'MUTABLE' or 'IMMUTABLE' they just select an option on the Enum and this ensures that in the future if new options are added (idk what those would be but whatever) we can handle those.

@ap00rv
Copy link
Contributor

ap00rv commented Feb 11, 2021

@MrArnoldPalmer
Copy link
Contributor

Closing this since #10557 got merged.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants