-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_s3_bucket_object: etag
can’t be used with any server encryption, but docs mention a different thing
#5033
Comments
Same issue happens on mac os x |
If you look at the AWS docs, I think the Terraform docs are correct about what could happen (more on that in a bit).
There is no such note under the section talking about using an AWS managed key. I think this is a limitation of Terraform. If we look at how
Notice how the author was unable to specify any arguments under The documentation should probably be updated to reflect this limitation. |
Update doc to explain etag inconsistency
While this is not an immediate response to the actual issue ... how about moving away from having the user provide the file md5 hash as an etag value at all to recognize that the file has changed and use an arbitrary checksum of the local file and store it in the terraform state after a successful upload? This way doing the checksum on the source and comparing it to the terraform state should be enough to recognize a changed file and the requirement to update the S3 object. Using the etag is unsafe in multiple cases - https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html Or am I missing anything / a certain use case there? |
any updates on this? @frittentheke makes a great suggestion I'm currently bit by needing server side encryption but then being unable to have terraform manage the object due to inability do recognize changes. |
@nwalke @marek-obuchowicz @eedwards-sk @akkessler @mikemac42 as you see referenced, I opened a new issue just about the independently done hash approach of tracking file changes - see #6668 |
Support for specifying the The feature request for a separate hash/checksum argument in #6668 is certainly still valid to cover the usage of other forms of SSE. Please follow that issue for updates there. Thanks. |
This has been released in version 2.25.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Currently, docs state that
etag
inaws_s3_bucket_object
can’t be used only with KMS encryption:However, when I try to use it with AES256 encryption, I receive the
error.
#2244 brought this issue about docs. #4928 closed it – however, the docs still talk only about KMS encryption. Looks like it’s either the issue in docs again (Terraform is right, docs are wrong) or in the Terraform itself (docs list correct expectations, but Terraform implements them wrong).
Community Note
Terraform Version
v0.11.7
Affected Resource(s)
aws_s3_bucket_object
Terraform Configuration Files
Debug Output
https://gist.github.com/iamakulov/7525920a9ebeaa0ca5af2b465a4be878
Steps to Reproduce
terraform apply
Important Factoids
I’m using Windows.
References
The text was updated successfully, but these errors were encountered: