diff --git a/terraform/modules/dandiset_bucket/main.tf b/terraform/modules/dandiset_bucket/main.tf index dc08790..f4a8c2b 100644 --- a/terraform/modules/dandiset_bucket/main.tf +++ b/terraform/modules/dandiset_bucket/main.tf @@ -344,7 +344,7 @@ resource "aws_s3_bucket_lifecycle_configuration" "expire_noncurrent_manifest_fil # Must have bucket versioning enabled first depends_on = [aws_s3_bucket_versioning.dandiset_bucket] - count = var.versioning ? 1 : 0 + count = var.versioning ? 1 : 0 && var.enable_manifest_file_expiration bucket = aws_s3_bucket.dandiset_bucket.id diff --git a/terraform/modules/dandiset_bucket/variables.tf b/terraform/modules/dandiset_bucket/variables.tf index 0eaf7db..f2f9525 100644 --- a/terraform/modules/dandiset_bucket/variables.tf +++ b/terraform/modules/dandiset_bucket/variables.tf @@ -34,3 +34,10 @@ variable "log_bucket_name" { type = string description = "The name of the log bucket." } + +# TODO: remove this after it's ready to be enabled in production +variable "enable_manifest_file_expiration" { + type = bool + description = "Whether or not to enable expiration of manifest files." + default = false +} diff --git a/terraform/staging_bucket.tf b/terraform/staging_bucket.tf index c0481d6..11e798d 100644 --- a/terraform/staging_bucket.tf +++ b/terraform/staging_bucket.tf @@ -10,6 +10,7 @@ module "staging_dandiset_bucket" { aws = aws aws.project = aws } + enable_manifest_file_expiration = true } module "staging_embargo_bucket" {