Created
April 3, 2018 12:54
-
-
Save brianwhigham/6905e16602a8f0f3cb66bd747b6c16ce to your computer and use it in GitHub Desktop.
cloudformation resource to create an ECR Repo with a lifecycle policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"ECRRepo": { | |
"Type" : "AWS::ECR::Repository", | |
"Properties" : { | |
"LifecyclePolicy" : { | |
"LifecyclePolicyText" : "{ \"rules\": [ { \"rulePriority\": 10, \"description\": \"remove untagged images except the latest one\", \"selection\": { \"tagStatus\": \"untagged\", \"countType\": \"imageCountMoreThan\", \"countNumber\": 1 }, \"action\": { \"type\": \"expire\" } } ] }" | |
}, | |
"RepositoryName" : { "Ref": "StackName" } | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment