From 4b824f5ddf7fd3f02b089518a068b17af0040e6a Mon Sep 17 00:00:00 2001 From: Jerome Wolff Date: Mon, 25 Sep 2023 09:43:54 +0200 Subject: [PATCH 1/2] Fix default lifecycle rule --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index f0bf0ae..578121c 100644 --- a/variables.tf +++ b/variables.tf @@ -41,7 +41,7 @@ variable "lifecycle_rules" { { description = "Keep the last 30 tagged images" tag_status = "tagged" - tag_prefix_list = ["latest", "prod", "sha"] + tag_prefix_list = ["sha"] count_type = "imageCountMoreThan" count_number = 30 }, From 9500e6c3bce69cde60d2df9c7d4f2f1303ca9fe0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 07:44:51 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dc7c2b6..d730151 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ benefits of a lifecycle policy, all with just a few simple commands. Try it out |------|-------------|------|---------|:--------:| | [force\_delete](#input\_force\_delete) | Delete the repository even if it contains images. | `bool` | `false` | no | | [image\_tag\_mutability](#input\_image\_tag\_mutability) | The tag mutability setting for the repository. | `string` | `"MUTABLE"` | no | -| [lifecycle\_rules](#input\_lifecycle\_rules) | Lifecycle policy rules for expiring images. |
list(object({
description = optional(string)
tag_status = optional(string)
tag_prefix_list = optional(list(string))
count_type = string
count_unit = optional(string)
count_number = number
}))
|
[
{
"count_number": 30,
"count_type": "imageCountMoreThan",
"description": "Keep the last 30 tagged images",
"tag_prefix_list": [
"latest",
"prod",
"sha"
],
"tag_status": "tagged"
},
{
"count_number": 10,
"count_type": "sinceImagePushed",
"count_unit": "days",
"description": "Expire untagged images older than 10 days",
"tag_status": "untagged"
}
]
| no | +| [lifecycle\_rules](#input\_lifecycle\_rules) | Lifecycle policy rules for expiring images. |
list(object({
description = optional(string)
tag_status = optional(string)
tag_prefix_list = optional(list(string))
count_type = string
count_unit = optional(string)
count_number = number
}))
|
[
{
"count_number": 30,
"count_type": "imageCountMoreThan",
"description": "Keep the last 30 tagged images",
"tag_prefix_list": [
"sha"
],
"tag_status": "tagged"
},
{
"count_number": 10,
"count_type": "sinceImagePushed",
"count_unit": "days",
"description": "Expire untagged images older than 10 days",
"tag_status": "untagged"
}
]
| no | | [name](#input\_name) | Name of the ECR repository. | `string` | n/a | yes | | [policy](#input\_policy) | Repository policy document in JSON format. | `string` | `null` | no | | [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository. | `bool` | `true` | no |