-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Cloudfront Origin does not support SpecRestApi #27501
Comments
Thank you. Can you manually construct this using only Cfn resources? |
@indrora I don't see what Cfn resources have to do with this. This is related to our higher level constructs. @brianantonelli all the aws-cdk/packages/aws-cdk-lib/aws-cloudfront-origins/lib/rest-api-origin.ts Lines 42 to 43 in b2a895e
aws-cdk/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts Lines 843 to 845 in b2a895e
|
@peterwoodworth @brianantonelli I was able to fix the bug and created a PR #27742 , this should be fixed when after they review it and merge it. |
Moved the url property from RestApi class to the RestApiBase to have the url property on all derived class. This will fix the problem mentioned in the issue where SpecRestApi does not work with the RestApiOrigin construct. PS. I could not perform the integration tests as the free tier on my personal account expired. Closes #27501. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Moved the url property from RestApi class to the RestApiBase to have the url property on all derived class. This will fix the problem mentioned in the issue where SpecRestApi does not work with the RestApiOrigin construct. PS. I could not perform the integration tests as the free tier on my personal account expired. Closes aws#27501. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
The
RestApiOrigin
constructor only supportsRestApi
and notRestApiBase
. This means a API created viaSpecRestApi
cannot be used to create a Cloudfront origin.Expected Behavior
Passing an instance of
SpecRestApi
toRestApiOrigin
should be accepted and create the origin.Current Behavior
When passing
SpecRestApi
toRestApiOrigin
an error is generatedReproduction Steps
Possible Solution
Update
RestApiOrigin
constructor to acceptRestApiBase
for restApiAdditional Information/Context
No response
CDK CLI Version
2.96.0 (build e6322aa)
Framework Version
No response
Node.js Version
v18.17.1
OS
MacOS
Language
Python
Language Version
3.11.4
Other information
No response
The text was updated successfully, but these errors were encountered: