-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from DNXLabs/feature/ecr-lifecycle
Add scan on push, ecr lifecycle and kms optional
- Loading branch information
Showing
4 changed files
with
29 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,6 @@ | ||
# resource "aws_ecr_lifecycle_policy" "default" { | ||
# repository = "${aws_ecr_repository.default.name}" | ||
resource "aws_ecr_lifecycle_policy" "default" { | ||
count = var.lifecycle_policy != "" ? 1 : 0 | ||
repository = aws_ecr_repository.default.name | ||
|
||
# policy = <<EOF | ||
# { | ||
# "rules": [ | ||
# { | ||
# "rulePriority": 1, | ||
# "description": "Expire images older than 14 days", | ||
# "selection": { | ||
# "countUnit": "days", | ||
# "countType": "sinceImagePushed", | ||
# "countNumber": 14, | ||
# "tagStatus": "untagged" | ||
# }, | ||
# "action": { | ||
# "type": "expire" | ||
# } | ||
# }, | ||
# { | ||
# "rulePriority": 2, | ||
# "description": "Expire images with feature tag", | ||
# "selection": { | ||
# "countType": "imageCountMoreThan", | ||
# "tagPrefixList": [ | ||
# "feature", | ||
# "prod", | ||
# "deploy", | ||
# "qa", | ||
# "nonprod", | ||
# "staging", | ||
# "preprod", | ||
# "dev", | ||
# "test", | ||
# "production" | ||
# ], | ||
# "countNumber": 1, | ||
# "tagStatus": "tagged" | ||
# }, | ||
# "action": { | ||
# "type": "expire" | ||
# } | ||
# }, | ||
# { | ||
# "rulePriority": 3, | ||
# "description": "Expire images with the same tag", | ||
# "selection": { | ||
# "countType": "imageCountMoreThan", | ||
# "countNumber": 1, | ||
# "tagStatus": "any" | ||
# }, | ||
# "action": { | ||
# "type": "expire" | ||
# } | ||
# } | ||
# ] | ||
# } | ||
# EOF | ||
# } | ||
policy = var.lifecycle_policy | ||
} |
This file contains 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