Skip to content

feat(cloudfront): Origin Shield support#15453

Merged
mergify[bot] merged 10 commits intoaws:masterfrom
smguggen:cloudfront-origin-shield
Jul 30, 2021
Merged

feat(cloudfront): Origin Shield support#15453
mergify[bot] merged 10 commits intoaws:masterfrom
smguggen:cloudfront-origin-shield

Conversation

@smguggen
Copy link
Copy Markdown
Contributor

@smguggen smguggen commented Jul 7, 2021

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 to OriginProps and SourceConfiguration 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

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Jul 7, 2021

@peterwoodworth peterwoodworth added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Jul 7, 2021
Copy link
Copy Markdown
Contributor

@njlynch njlynch left a 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>
@mergify mergify bot dismissed njlynch’s stale review July 29, 2021 13:54

Pull request has been modified.

Comment on lines +1158 to +1160
if (!(/^\w\w\-[a-z]*\-\d$/).test(originShieldRegion)) {
throw new Error(`originShieldRegion ${originShieldRegion} is not a valid AWS region.`);
}
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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>
@mergify mergify bot dismissed njlynch’s stale review July 29, 2021 16:54

Pull request has been modified.

njlynch
njlynch previously approved these changes Jul 29, 2021
Copy link
Copy Markdown
Contributor

@njlynch njlynch left a 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 njlynch changed the title feat(cloudfront): Add Origin Shield to Cloudfront Origins and Web Distribution - closes #12872 feat(cloudfront): Origin Shield support Jul 29, 2021
@smguggen
Copy link
Copy Markdown
Contributor Author

@njlynch Sorry, build was failing because previous change had trailing spaces, can you approve one more time? Thanks.

@smguggen smguggen requested a review from njlynch July 30, 2021 00:58
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 30, 2021

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-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 5827266
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 08ebbae into aws:master Jul 30, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 30, 2021

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).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Aug 3, 2021
**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*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
**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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@aws-cdk/aws-cloudfront Related to Amazon CloudFront

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessing OriginShieldProperty in cloudfront.distribution

4 participants