From baf74f5069d7f7b99407a41953fdd059a87c51f9 Mon Sep 17 00:00:00 2001 From: Matthew Creal Morgan Date: Wed, 12 Feb 2025 16:17:11 -0800 Subject: [PATCH] add lifecycle policy keep count (#8) --- README.md | 2 +- copy_images.tf | 7 ++++--- main.tf | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d042832..b50041a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Developer NOTE: We should automate this configuration. | Name | Source | Version | |------|--------|---------| | [images](#module\_images) | git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade | -| [tempo-irsa-role](#module\_tempo-irsa-role) | git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/ | 1.0.0 | +| [tempo-irsa-role](#module\_tempo-irsa-role) | git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/ | base | | [tempo-s3](#module\_tempo-s3) | git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard | tf-upgrade | ## Resources diff --git a/copy_images.tf b/copy_images.tf index bb8baca..71b92d2 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -22,7 +22,8 @@ module "images" { image_config = local.image_config tags = {} - enable_lifecycle_policy = true - lifecycle_policy_all = true - force_delete = true + enable_lifecycle_policy = true + lifecycle_policy_all = true + force_delete = true + lifecycle_policy_keep_count = 3 } diff --git a/main.tf b/main.tf index 3beb451..6458cc4 100644 --- a/main.tf +++ b/main.tf @@ -8,7 +8,7 @@ locals { # IRSA Role for Tempo ################################################################################ module "tempo-irsa-role" { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=1.0.0" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=base" role_name = "${var.cluster_name}-tempo" attach_s3_bucket_owner_policy = true