[Bug]: datasource aws_s3_object refuses to import data from legitimate "human readable" content-types #27697
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/s3
Issues and PRs that pertain to the s3 service.
Milestone
Terraform Core Version
1.3
AWS Provider Version
4.38.0
Affected Resource(s)
Expected Behavior
Honestly, I would expect an aws_s3_object resource to be able to read data, despite whether its in a "human readable format" as the docs state. Because there are all sorts of usecases where you'd want to read from a binary object.
But...... even if you are really going to restrict to human-readable objects only, it would be super useful to increase the range of content-type's that you consider to be human readable.
In my case I have an object put by an external client in a bucket I want to read. Its listed as application/xml which is human readable. But because you only accept text/xml, I cannot get access to the body - the body is just null.
If I copy the object and rename the content-type to text/xml then as per the docs I can read the body field.
Actual Behavior
Because the content-type is set to application/xml, terraform datasources refuses to load the content into the body field.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Not necessary
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No response
The text was updated successfully, but these errors were encountered: