Skip to content

Commit

Permalink
Change noncurrent version expiration on fcrepo binary bucket from 7 d…
Browse files Browse the repository at this point in the history
…ays to 2 years
  • Loading branch information
mbklein committed Nov 7, 2023
1 parent c525815 commit 9e5b10b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions fcrepo/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,28 @@ resource "aws_cloudwatch_log_group" "fcrepo_logs" {
resource "aws_s3_bucket" "fedora_binary_bucket" {
bucket = "${local.namespace}-fedora-binaries"

lifecycle_rule {
abort_incomplete_multipart_upload_days = 2
enabled = true
id = "purge-deleted-objects"
tags = local.tags
}

resource "aws_s3_bucket_lifecycle_configuration" "fedora_binary_bucket" {
bucket = aws_s3_bucket.fedora_binary_bucket.id
rule {
id = "purge-deleted-objects"
status = "Enabled"

abort_incomplete_multipart_upload {
days_after_initiation = 2
}

expiration {
days = 0
expired_object_delete_marker = true
}

noncurrent_version_expiration {
days = 7
noncurrent_days = 730
}
}

tags = local.tags
}

resource "aws_iam_user" "fedora_binary_bucket_user" {
Expand Down
2 changes: 1 addition & 1 deletion modules/dbschema/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "random_string" "role_password" {
length = 16
upper = true
lower = true
number = true
numeric = true
special = false
}

Expand Down

0 comments on commit 9e5b10b

Please sign in to comment.