This template demonstrates how to upload a file to an S3 bucket using the aws_s3_bucket_object resource.

Terraform Template

resource "aws_s3_bucket_object" "object" {
  bucket = "your_bucket_name"
  etag = filemd5("path/to/file")
  key = "new_object_key"
  source = "path/to/file"
}