diff --git a/README.md b/README.md index e18f17a..dc962d1 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ A Terraform Module to integrate Amazon Container Registries (ECR) with Lacework. | `limit_by_tags` |A list of image tags to limit the assessment of images with matching tags. If you specify limit_by_tags and limit_by_labels limits, they function as an AND. Supported field input can be ["mytext\*mytext", "mytext", "mytext\*", "mytext". Only one * wildcard is supported.| `list(string)` | no | | `limit_by_labels` |A list of image labels to limit the assessment of images with matching labels. If you specify limit_by_tags and limit_by_labels limits, they function as an AND. Supported field input can be ["mytext\*mytext", "mytext", "mytext*", "mytext"].Only one * wildcard is supported.| `list(string)` | no | | `limit_by_repositories` |A list of repositories to assess.| `list(string)` | no | +| `limit_num_imgs` |The maximum number of newest container images to assess per repository. Must be one of 5, 10, or 15. Defaults to 5.| `number` | 5 | no | ## Outputs diff --git a/main.tf b/main.tf index 8d0f608..2074b30 100644 --- a/main.tf +++ b/main.tf @@ -41,8 +41,9 @@ resource "lacework_integration_ecr" "iam_role" { role_arn = local.iam_role_arn external_id = local.iam_role_external_id } - limit_by_tags = var.limit_by_tags - limit_by_labels = var.limit_by_labels + limit_by_tags = var.limit_by_tags + limit_by_labels = var.limit_by_labels limit_by_repositories = var.limit_by_repositories + limit_num_imgs = var.limit_num_imgs depends_on = [time_sleep.wait_time] } diff --git a/variables.tf b/variables.tf index 0dfd9f8..4770afa 100644 --- a/variables.tf +++ b/variables.tf @@ -46,6 +46,12 @@ variable "limit_by_repositories" { description = "A list of repositories to assess" } +variable "limit_num_imgs" { + type = number + default = 5 + description = "The maximum number of newest container images to assess per repository. Must be one of 5, 10, or 15. Defaults to 5." +} + variable "external_id_length" { type = number default = 16