Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default lifecycle rule #12

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading