-
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
Add example for cloudfront_distribution with s3 webhosting endpoint #5947
base: main
Are you sure you want to change the base?
Conversation
…e change adds another example with separate headers.The AWS API (and the resource docs) were unclear about this and this commit clarifies it with an example.Targets current Terraform version.Closes hashicorp#4757
query_string = false | ||
|
||
cookies { | ||
forward = "all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably don't need to forward any cookies here, because s3 doesn't care if they are present. It will improve caching on Cloudfront. Same with most of the headers
, except CORS ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The User-Agent
custom_header is used as authentication for the S3 Website endpoint, so if you meant this header, we cannot remove it.
I will remove cookies
block tomorrow and run the tests again, to see if it introduced any malbehaviour. Your suggestion sounds very reasonable, though, so I don't think we might expect any issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests were - of course - successful. Sorry for the delay. Changed the cookie forwarding to none
in 754f0a8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gersilex I actually meant this: https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#headers
However, I've checked that if you don't specify any value here, then it forwards no headers, which is good :)
So it's all good, sorry for confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekini I added your recommendation and this Pull Request is ready for review again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekini I added your recommendation and this Pull Request is ready for review again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-Authored-By: gersilex <gersilex@gmail.com>
Co-Authored-By: gersilex <gersilex@gmail.com>
@austinbutler Your updates look great. Thank you very much. |
Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding. Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author. For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000. For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide. |
The change adds another example with separate headers.
Fixes #4757