How do I change S3 object’s acl?

I need to expose few objects in s3 to be accessible via https. I'm using aws_s3_bucket_object resource and it does change the permission to public-read but also the file is corrupted when this runs against it.

resource "aws_s3_bucket_object" "myfile" {
bucket =
key = "path/to/myfile"
acl = "public-read"

I'm beginning to think either I'm not using aws_s3_bucket_object right or I should be using something else to set the acl. Can someone point out what I'm doing wrong?

submitted by /u/def_struct
[link] [comments]

Read more here:

Content Attribution

This content was originally published by /u/def_struct at Terraform, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: