From 80d118bfd209fb0551d02807806a71782d3daaf3 Mon Sep 17 00:00:00 2001 From: MickVanDuijn Date: Tue, 13 Aug 2024 14:30:45 +0200 Subject: [PATCH] feat: add lifecycle rules support to S3 resources in Terraform --- terraform/persistent/s3.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terraform/persistent/s3.tf b/terraform/persistent/s3.tf index 3c27504..cb645ec 100644 --- a/terraform/persistent/s3.tf +++ b/terraform/persistent/s3.tf @@ -1,7 +1,8 @@ variable "s3" { type = map( object({ - name_prefix = string + name_prefix = string + lifecycle_rules = optional(any, []) }) ) default = {} @@ -10,9 +11,10 @@ variable "s3" { module "s3" { for_each = var.s3 - source = "git::https://github.com/skyleague/aws-s3.git?ref=v1.0.0" + source = "git::https://github.com/skyleague/aws-s3.git?ref=v1.1.0" bucket_name_prefix = each.value.name_prefix + lifecycle_rules = each.value.lifecycle_rules }