From 4c556a2c412dd3159a454f7b0f26d28ae34524e2 Mon Sep 17 00:00:00 2001 From: Zachary Hill Date: Thu, 28 Mar 2024 16:12:30 -0400 Subject: [PATCH] Made all lifecycle_rules optional --- modules/aws/s3/bucket/variables.tf | 6 +++--- modules/aws/transfer_family/variables.tf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/aws/s3/bucket/variables.tf b/modules/aws/s3/bucket/variables.tf index 2b74d405..5f2030e9 100644 --- a/modules/aws/s3/bucket/variables.tf +++ b/modules/aws/s3/bucket/variables.tf @@ -178,7 +178,7 @@ variable "intelligent_tiering_days" { ###################### variable "lifecycle_rules" { - description = "(Optional) Configuration of object lifecycle management (LCM). Can have several rules as a list of maps where each map is the lifecycle rule configuration. Type should be list(map(string))." + description = "(Optional) Configuration of object lifecycle management (LCM). Can have several rules as a list of maps where each map is the lifecycle rule configuration." type = list(object({ id = string status = string @@ -200,11 +200,11 @@ variable "lifecycle_rules" { newer_noncurrent_versions = optional(number) noncurrent_days = optional(number) })) - noncurrent_version_transitions = list(object({ + noncurrent_version_transitions = optional(list(object({ newer_noncurrent_versions = optional(number) noncurrent_days = optional(number) storage_class = optional(string) - })) + }))) transition = list(object({ date = optional(string) days = optional(number) diff --git a/modules/aws/transfer_family/variables.tf b/modules/aws/transfer_family/variables.tf index afa2c3c6..ef052ab7 100755 --- a/modules/aws/transfer_family/variables.tf +++ b/modules/aws/transfer_family/variables.tf @@ -177,7 +177,7 @@ variable "vpc_id" { ########################### variable "lifecycle_rules" { - description = "(Optional) A list of lifecycle rules to apply to the bucket" + description = "(Optional) Configuration of object lifecycle management (LCM). Can have several rules as a list of maps where each map is the lifecycle rule configuration." type = list(object({ id = string status = string @@ -199,11 +199,11 @@ variable "lifecycle_rules" { newer_noncurrent_versions = optional(number) noncurrent_days = optional(number) })) - noncurrent_version_transitions = list(object({ + noncurrent_version_transitions = optional(list(object({ newer_noncurrent_versions = optional(number) noncurrent_days = optional(number) storage_class = optional(string) - })) + }))) transition = list(object({ date = optional(string) days = optional(number)