Skip to content

Commit

Permalink
Merge pull request #1497 from ministryofjustice/MLPAB-2517-fix-overwr…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpearce-digital authored Sep 17, 2024
2 parents 22053be + de88677 commit 47bcf84
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions terraform/account/region/s3_lb_access_logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,30 @@ resource "aws_s3_bucket_lifecycle_configuration" "lifecycle" {
bucket = aws_s3_bucket.access_log.id

rule {
id = "retain-for-400-days"
id = "retain-logs-for-13-months"
status = "Enabled"
transition {
days = 30
storage_class = "STANDARD_IA"
}
transition {
days = 60
storage_class = "GLACIER"
}
expiration {
days = 400
}
noncurrent_version_expiration {
noncurrent_days = 400
}
}

rule {
id = "abort-incomplete-multipart-upload"
status = "Enabled"
abort_incomplete_multipart_upload {
days_after_initiation = 7
}

}
}

Expand Down Expand Up @@ -169,31 +177,6 @@ resource "aws_s3_bucket_public_access_block" "access_log" {
restrict_public_buckets = true
}

resource "aws_s3_bucket_lifecycle_configuration" "log_retention_policy" {
provider = aws.region
bucket = aws_s3_bucket.access_log.id

rule {
id = "retain-logs-for-13-months"
status = "Enabled"

transition {
days = 30
storage_class = "STANDARD_IA"
}

transition {
days = 60
storage_class = "GLACIER"
}

expiration {
days = 400
}

}
}

data "aws_iam_role" "sns_success_feedback" {
name = "SNSSuccessFeedback"
provider = aws.global
Expand Down

0 comments on commit 47bcf84

Please sign in to comment.