feat(api-gateway): deploy RestApi to existing stage#29486
feat(api-gateway): deploy RestApi to existing stage#29486mergify[bot] merged 7 commits intoaws:mainfrom
Conversation
godwingrs22
left a comment
There was a problem hiding this comment.
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
...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
godwingrs22
left a comment
There was a problem hiding this comment.
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
stageNametoDeployment. Updated README with two new sections:Deploying to an existing stageandControlled triggering of deploymentsto show how users can trigger new deployments with their latest API changes if they manually create aDeploymentresource for RestApi.Since
RestApiBasemanagesDeploymentconstructs, this change applies to bothSpecRestApiandRestApi.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