feat(cloudfront): add Distribution.addOrigin() to register origins without behaviors (#37652)#37657
feat(cloudfront): add Distribution.addOrigin() to register origins without behaviors (#37652)#37657
Conversation
|
|
||||||||||||||
|
|
||||||||||||||
laurelmay
left a comment
There was a problem hiding this comment.
Thanks for your contribution and the tests! This looks ready for core team review.
Adds a public addOrigin() method to Distribution that allows adding an origin to the distribution without associating it with a cache behavior. This is useful for pre-registering origins for use in origin groups or other advanced configurations.
closes #37652
Issue # (if applicable)
Closes #37652.
Reason for this change
Adding the ability to add an origin without a behavior to support dynamic routing withing cloudfront functions.
Description of changes
Added .addOrigin() which delegates to the existing internal method. It may be better to just expose the internal, but I added a new function - happy to switch to the other approach based on feedback!
Describe any new or updated permissions being added
None.
Description of how you validated changes
Added unit tests and an integration test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license