-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(cloudfront): Origin Shield support #15453
Conversation
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.
Thanks for the contribution! Just a few minor nitpicks and one API clarity question.
Co-authored-by: Nick Lynch <nlynch@amazon.com>
Co-authored-by: Nick Lynch <nlynch@amazon.com>
if (!(/^\w\w\-[a-z]*\-\d$/).test(originShieldRegion)) { | ||
throw new Error(`originShieldRegion ${originShieldRegion} is not a valid AWS region.`); | ||
} |
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.
If we're removing the region validation from the Distribution, might as well remove it from here for consistency.
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.
Ok, missed that one, I removed it and went ahead and made that return use a ternary operator too.
Co-authored-by: Nick Lynch <nlynch@amazon.com>
…perator on toOriginShieldProperty method
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.
Looks great, thanks!
@njlynch Sorry, build was failing because previous change had trailing spaces, can you approve one more time? Thanks. |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
**Closes [aws#12872](aws#12872 - Origin Shield is a part of the CfnDistribution resources but has not yet been added to the relevant CloudFront constructs. These changes add `originShieldRegion` fields to `OriginProps` and `SourceConfiguration` as specified [here](aws#12872 (comment)) as well as update the ReadMe and all the necessary tests. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
**Closes [aws#12872](aws#12872 - Origin Shield is a part of the CfnDistribution resources but has not yet been added to the relevant CloudFront constructs. These changes add `originShieldRegion` fields to `OriginProps` and `SourceConfiguration` as specified [here](aws#12872 (comment)) as well as update the ReadMe and all the necessary tests. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Closes #12872 - Origin Shield is a part of the CfnDistribution resources but has not yet been added to the relevant CloudFront constructs. These changes add
originShieldRegion
fields toOriginProps
andSourceConfiguration
as specified here as well as update the ReadMe and all the necessary tests.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license