This template enables versioning on an S3 bucket and sets the ACL to private.

Terraform Template

resource "aws_s3_bucket" "example" {
  bucket = "example-bucket"
}

resource "aws_s3_bucket_acl" "example" {
  acl = "private"
  bucket = aws_s3_bucket.example.id
}

resource "aws_s3_bucket_versioning" "versioning_example" {
  bucket = aws_s3_bucket.example.id

  versioning_configuration {
    status = "Enabled"
  }
}