Skip to content

Commit

Permalink
Fix noncurrent_version_expiration
Browse files Browse the repository at this point in the history
The `noncurrent_days` field is actually mandatory. The AWS Terraform provider docs are incorrect, see hashicorp/terraform-provider-aws#35328
  • Loading branch information
mvandenburgh committed Jan 7, 2025
1 parent c2717f0 commit 1f7627c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion terraform/modules/dandiset_bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,11 @@ resource "aws_s3_bucket_lifecycle_configuration" "expire_noncurrent_manifest_fil
prefix = "dandisets/"
}

# Only keep 1 noncurrent version of manifest files
noncurrent_version_expiration {
# keep most recent noncurrent version indefinitely
newer_noncurrent_versions = 1
# delete all other noncurrent versions after 1 day
noncurrent_days = 1
}

# Also delete any delete markers associated with the expired object
Expand Down

0 comments on commit 1f7627c

Please sign in to comment.