You must be logged in to view saved presets
This template sets up an S3 bucket with Object Lock configuration in compliance mode for 5 days.
resource "aws_s3_bucket" "example" {
bucket = "mybucket"
}
resource "aws_s3_bucket_object_lock_configuration" "example" {
bucket = aws_s3_bucket.example.id
rule {
default_retention {
days = 5
mode = "COMPLIANCE"
}
}
}
resource "aws_s3_bucket_versioning" "example" {
bucket = aws_s3_bucket.example.id
versioning_configuration {
status = "Enabled"
}
}