-
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(api-gateway): deploy RestApi to existing stage #29486
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.
left few minor comments.
9e74b7e
to
00306b6
Compare
...cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi.import-deploymentstage.ts
Outdated
Show resolved
Hide resolved
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.
left some comments
...cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi.import-deploymentstage.ts
Outdated
Show resolved
Hide resolved
a6f802e
to
57e12d1
Compare
57e12d1
to
6e9fcfc
Compare
acf1887
to
675eac7
Compare
d589ef3
to
d0955d0
Compare
265dbc8
to
d029be0
Compare
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.
LGTM. Thanks @gracelu0 for your effort in implmenting this much awaited feature.
Thank you for contributing! Your pull request will be updated from main 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 main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Hi @godwingrs22 @gracelu0 : I am still unable to use this in CDK Python v 2.139.1 |
Hi @leoujjawal it looks like this didn't make it into the latest release - it should be included the next release. |
I have been trying to use this but to no avail. I see my resources in the resource view, I see a new deployment is active, but the stage hasn't changed.
|
All you got to do is -
Also consider adding a deopendency on the stage for the resource you are trying to create
|
Issue
Closes #25582 .
Reason for this change
If I have to manually create a new deployment for API gateway but want to deploy to an existing stage instead of creating a new stage, the current workaround is
(deployment as any).resource.stageName = "myStage";
Description of changes
Added a new property
stageName
toDeployment
. Updated README with two new sections:Deploying to an existing stage
andControlled triggering of deployments
to show how users can trigger new deployments with their latest API changes if they manually create aDeployment
resource for RestApi.Since
RestApiBase
managesDeployment
constructs, this change applies to bothSpecRestApi
andRestApi
.Description of how you validated changes
Added unit tests and integration tests. Also successfully deployed a sample app to my account where I created a stage in the API gateway console and specified the stage name in the new deployment.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license