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(app-staging-synthesizer): enable tag immutability #26656

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export class DefaultStagingStack extends Stack implements IStagingResources {
if (this.stagingRepos[asset.assetName] === undefined) {
this.stagingRepos[asset.assetName] = new ecr.Repository(this, repoName, {
repositoryName: repoName,
imageTagMutability: ecr.TagMutability.IMMUTABLE,
lifecycleRules: [{
description: 'Garbage collect old image versions',
maxImageCount: this.props.imageAssetVersionCount ?? 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"defaultresourcesmaxecrasset13112F7F9": {
"Type": "AWS::ECR::Repository",
"Properties": {
"ImageTagMutability": "IMMUTABLE",
"LifecyclePolicy": {
"LifecyclePolicyText": "{\"rules\":[{\"rulePriority\":1,\"description\":\"Garbage collect old image versions\",\"selection\":{\"tagStatus\":\"any\",\"countType\":\"imageCountMoreThan\",\"countNumber\":3},\"action\":{\"type\":\"expire\"}}]}"
},
Expand Down Expand Up @@ -693,6 +694,7 @@
"defaultresourcesmaxecrasset2904B88A7": {
"Type": "AWS::ECR::Repository",
"Properties": {
"ImageTagMutability": "IMMUTABLE",
"LifecyclePolicy": {
"LifecyclePolicyText": "{\"rules\":[{\"rulePriority\":1,\"description\":\"Garbage collect old image versions\",\"selection\":{\"tagStatus\":\"any\",\"countType\":\"imageCountMoreThan\",\"countNumber\":3},\"action\":{\"type\":\"expire\"}}]}"
},
Expand Down
Loading