terraform-aws-modules/terraform-aws-s3-bucket ? reverse-engineered prompt

Reverse engineered prompt

Build me a Terraform module for AWS S3 that can create and manage a bucket with the usual real world options people need. I want to be able to turn on versioning, static website hosting, logging, CORS, lifecycle rules, server side encryption, object locking, replication, and public access block settings, all from simple inputs. It should also support bucket policies, including special cases for load balancer logs and WAF logs, and let me plug in a custom policy with placeholders for the bucket name and ARN.

Please also cover the newer S3 bucket types if possible, like directory buckets, table buckets, and vector buckets, plus a separate option for S3 file system access on a bucket when versioning and encryption are enabled. Make it easy to create or skip the bucket with one flag, and include a few working examples so I can copy and paste them. If you need to check the latest AWS Terraform provider docs while building it, go ahead and look them up.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab