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

feat(cloudfront): REST API origin #20335

Merged
merged 4 commits into from
May 19, 2022
Merged

Conversation

jogold
Copy link
Contributor

@jogold jogold commented May 13, 2022

Add an origin to work with API Gateway REST APIs.

Extracts the domain name and origin path from the API url.


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Add an origin to work with API Gateway REST APIs.

Extracts the domain name and origin path from the API url.
@gitpod-io
Copy link

gitpod-io bot commented May 13, 2022

@github-actions github-actions bot added the p2 label May 13, 2022
@jogold jogold changed the title feat(cloudfront-origins): REST API origin feat(cloudfront-origins): REST API origins May 13, 2022
@jogold jogold changed the title feat(cloudfront-origins): REST API origins feat(cloudfront-origins): REST API origin May 13, 2022
@jogold jogold changed the title feat(cloudfront-origins): REST API origin feat(cloudfront-origins): REST API origin May 13, 2022
@jogold jogold changed the title feat(cloudfront-origins): REST API origin feat(cloudfront-origins): REST API origin May 13, 2022
@jogold jogold changed the title feat(cloudfront-origins): REST API origin feat(cloudfront-origins): REST API origins May 14, 2022
@jogold jogold changed the title feat(cloudfront-origins): REST API origins feat(cloudfront-origins): REST API origin May 14, 2022
@rix0rrr rix0rrr changed the title feat(cloudfront-origins): REST API origin feat(cloudfront): REST API origin May 19, 2022
@mergify
Copy link
Contributor

mergify bot commented May 19, 2022

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
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 366a734
  • 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 f7693e3 into aws:master May 19, 2022
@mergify
Copy link
Contributor

mergify bot commented May 19, 2022

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

@jogold jogold deleted the cf-rest-api-origin branch May 20, 2022 13:24
wphilipw pushed a commit to wphilipw/aws-cdk that referenced this pull request May 23, 2022
Add an origin to work with API Gateway REST APIs.

Extracts the domain name and origin path from the API url.


----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comment on lines +42 to +45
super(cdk.Fn.select(2, cdk.Fn.split('/', restApi.url)), {
originPath: `/${cdk.Fn.select(3, cdk.Fn.split('/', restApi.url))}`,
...props,
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't Fn.parseDomainName be used here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know about Fn.parseDomainName... but this version extracts the domain name with a single select and split...

@rix0rrr rix0rrr added the effort/small Small work item – less than a day of effort label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants