Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set canned ACL in aws_s3_bucket_object. #8091

Conversation

kwilczynski
Copy link
Contributor

An S3 Bucket owner may wish to set a canned ACL (as opposite to explicitly set
grantees, etc.) for an object. This commit adds an optional "acl" attribute to
the aws_s3_bucket_object resource so that the owner of the S3 bucket can
specify an appropriate pre-defined ACL to use when creating an object.

Signed-off-by: Krzysztof Wilczynski krzysztof.wilczynski@linux.com

@kwilczynski
Copy link
Contributor Author

Resolves #7951 and #7744.

@kwilczynski
Copy link
Contributor Author

Tests are passing:

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSS3BucketObject_acl'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/10 11:42:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3BucketObject_acl -timeout 120m
=== RUN   TestAccAWSS3BucketObject_acl
--- PASS: TestAccAWSS3BucketObject_acl (82.37s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    82.393s
$ make test TEST=./builtin/providers/aws TESTARGS='-run=TestResourceAWSS3BucketObjectAcl_validation'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/10 11:46:18 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/aws -run=TestResourceAWSS3BucketObjectAcl_validation -timeout=30s -parallel=4
ok      github.com/hashicorp/terraform/builtin/providers/aws    0.019s

@kwilczynski
Copy link
Contributor Author

@stack72 over to you 🚀

An S3 Bucket owner may wish to set a canned ACL (as opposite to explicitly set
grantees, etc.) for an object. This commit adds an optional "acl" attribute to
the aws_s3_bucket_object resource so that the owner of the S3 bucket can
specify an appropriate pre-defined ACL to use when creating an object.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
@stack72
Copy link
Contributor

stack72 commented Aug 10, 2016

LGTM! Thanks :)

% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSS3BucketObject_'        1 ↵
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/10 15:53:33 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3BucketObject_ -timeout 120m
=== RUN   TestAccAWSS3BucketObject_source
--- PASS: TestAccAWSS3BucketObject_source (54.76s)
=== RUN   TestAccAWSS3BucketObject_content
--- PASS: TestAccAWSS3BucketObject_content (55.00s)
=== RUN   TestAccAWSS3BucketObject_withContentCharacteristics
--- PASS: TestAccAWSS3BucketObject_withContentCharacteristics (54.63s)
=== RUN   TestAccAWSS3BucketObject_updates
--- PASS: TestAccAWSS3BucketObject_updates (87.53s)
=== RUN   TestAccAWSS3BucketObject_updatesWithVersioning
--- PASS: TestAccAWSS3BucketObject_updatesWithVersioning (93.17s)
=== RUN   TestAccAWSS3BucketObject_kms
--- PASS: TestAccAWSS3BucketObject_kms (165.81s)
=== RUN   TestAccAWSS3BucketObject_acl
--- PASS: TestAccAWSS3BucketObject_acl (91.77s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    602.689s

@stack72 stack72 merged commit f5b46b8 into hashicorp:master Aug 10, 2016
@miketheman
Copy link
Contributor

@stack72 The updates to the docs/website don't appear on https://www.terraform.io/docs/providers/aws/d/s3_bucket_object.html - I spent a few minutes wondering where acl came from.

Does the website get automatically rebuilt with any kind of frequency?

@stack72
Copy link
Contributor

stack72 commented Sep 22, 2016

Hi @miketheman

apologies for the confusion here - the part of the docs you are looking at relates to the data source not a resource - i know this isn't very clear :(

https://www.terraform.io/docs/providers/aws/r/s3_bucket_object.html#acl

P.

@miketheman
Copy link
Contributor

Hey @stack72!
Thanks for the update, that is indeed confusing.

@ghost
Copy link

ghost commented Apr 22, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants