Skip to content

Commit

Permalink
Merge pull request #12 from geekcell/fix-default-lifecycle-rule
Browse files Browse the repository at this point in the history
fix: default lifecycle rule
  • Loading branch information
Ic3w0lf authored Sep 25, 2023
2 parents bd4c475 + 9500e6c commit dcff901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ benefits of a lifecycle policy, all with just a few simple commands. Try it out
|------|-------------|------|---------|:--------:|
| <a name="input_force_delete"></a> [force\_delete](#input\_force\_delete) | Delete the repository even if it contains images. | `bool` | `false` | no |
| <a name="input_image_tag_mutability"></a> [image\_tag\_mutability](#input\_image\_tag\_mutability) | The tag mutability setting for the repository. | `string` | `"MUTABLE"` | no |
| <a name="input_lifecycle_rules"></a> [lifecycle\_rules](#input\_lifecycle\_rules) | Lifecycle policy rules for expiring images. | <pre>list(object({<br> description = optional(string)<br> tag_status = optional(string)<br> tag_prefix_list = optional(list(string))<br> count_type = string<br> count_unit = optional(string)<br> count_number = number<br> }))</pre> | <pre>[<br> {<br> "count_number": 30,<br> "count_type": "imageCountMoreThan",<br> "description": "Keep the last 30 tagged images",<br> "tag_prefix_list": [<br> "latest",<br> "prod",<br> "sha"<br> ],<br> "tag_status": "tagged"<br> },<br> {<br> "count_number": 10,<br> "count_type": "sinceImagePushed",<br> "count_unit": "days",<br> "description": "Expire untagged images older than 10 days",<br> "tag_status": "untagged"<br> }<br>]</pre> | no |
| <a name="input_lifecycle_rules"></a> [lifecycle\_rules](#input\_lifecycle\_rules) | Lifecycle policy rules for expiring images. | <pre>list(object({<br> description = optional(string)<br> tag_status = optional(string)<br> tag_prefix_list = optional(list(string))<br> count_type = string<br> count_unit = optional(string)<br> count_number = number<br> }))</pre> | <pre>[<br> {<br> "count_number": 30,<br> "count_type": "imageCountMoreThan",<br> "description": "Keep the last 30 tagged images",<br> "tag_prefix_list": [<br> "sha"<br> ],<br> "tag_status": "tagged"<br> },<br> {<br> "count_number": 10,<br> "count_type": "sinceImagePushed",<br> "count_unit": "days",<br> "description": "Expire untagged images older than 10 days",<br> "tag_status": "untagged"<br> }<br>]</pre> | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the ECR repository. | `string` | n/a | yes |
| <a name="input_policy"></a> [policy](#input\_policy) | Repository policy document in JSON format. | `string` | `null` | no |
| <a name="input_scan_on_push"></a> [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository. | `bool` | `true` | no |
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit dcff901

Please sign in to comment.