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

[Bug]: datasource aws_s3_object refuses to import data from legitimate "human readable" content-types #27697

Closed
gtmtech opened this issue Nov 8, 2022 · 3 comments · Fixed by #27704
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service.
Milestone

Comments

@gtmtech
Copy link

gtmtech commented Nov 8, 2022

Terraform Core Version

1.3

AWS Provider Version

4.38.0

Affected Resource(s)

  • data.aws_s3_object

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

  • make yourself an s3 object of content-type application/xml
  • try and read it
  • you cant

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

@gtmtech gtmtech added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Nov 8, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service. and removed bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Nov 8, 2022
@github-actions github-actions bot added this to the v4.55.0 milestone Feb 10, 2023
@github-actions
Copy link

This functionality has been released in v4.55.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. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants