Skip to content

Commit

Permalink
💸 cost: Adds S3 transition to one zone IA to save pennies (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendoerr authored Aug 23, 2024
1 parent 7f78a6a commit 5a0d7b7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions aws-s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,19 @@ data "aws_iam_policy_document" "cloudfront_s3_origin" {
}
}
}

resource "aws_s3_bucket_lifecycle_configuration" "example" {
bucket = module.s3_site.s3_bucket_id

rule {
id = "rule-1"
status = "Enabled"
transition {
storage_class = "ONEZONE_IA"
days = 30
}
abort_incomplete_multipart_upload {
days_after_initiation = 1
}
}
}

0 comments on commit 5a0d7b7

Please sign in to comment.