Skip to content

Commit

Permalink
chore: Configure lifecycle policy for AWS ECR [skip pizza]
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Dec 12, 2024
1 parent a9b3b2d commit 22358c5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion infrastructure/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,17 @@ const CUSTOM_DOMAINS: CustomDomains =
export = async () => {
const DOMAIN: string = await certificates.requireOutputValue("domain");

const repo = new awsx.ecr.Repository("repo");
const repo = new awsx.ecr.Repository("repo", {
lifeCyclePolicyArgs: {
rules: [
{
description: "Keep last 100 images",
maximumNumberOfImages: 100,
selection: "any",
},
],
},
});

const vpc = awsx.ec2.Vpc.fromExistingIds("vpc", {
vpcId: networking.requireOutput("vpcId"),
Expand Down

0 comments on commit 22358c5

Please sign in to comment.