-
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
aws-apigateway: Documentation lacks information about stack separation for RestApi and Resources #29690
Comments
Thanks for creating the issue/PR. There is a note in https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Deployment.html that says:
Also here is a link to another workaround in that latter issue you referenced. Maybe further clarification is needed in the docs but I'm not sure about just linking #13526 in your PR. |
@tim-finnigan
The code provided in the other workaround you suggested does not solve the problem I presented. With that code as well, no new
Thank you. I also don't think just linking the issue being discussed is the optimal solution. |
### Issue #29690 Closes #29690 ### Reason for this change Regarding the stack separation of RestApi and Resource, there is no documentation about the fact that Deployment is not automatically created. When I actually add resources to the code documented and try cdk deploy for the second time and beyond, a new deployment is not created, and the latest resources are not reflected. ### Description of changes I added a note and related links to the documentation. ### Description of how you validated changes Nothing. It is just to change the description. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the issue
Overview
In this documentation, I would like to note that when separating the stacks for
RestApi
andResource
,Deployment
is not automatically created, and to avoid this issue, it is necessary to useDeployment.addToLogicalId()
.Details
When a
Resource
is added to anIRestApi
imported viaRestApi.fromRestApiAttribute
orRestApi.fromRestApiId
,Deployment
is not created, so the latest resource state is not associated with the API Gateway stage, which is a known issue.This has been discussed in several issues, including the following:
We understand that it is not easy to automatically create Deployment, and there may be differing opinions on whether it should be fixed.
However, since there is no mention of this issue in the documentation, we feel that many developers who are separating stacks related to API Gateway may unintentionally create an environment where
Deployment
is not created.Due to this issue, developers need to manually deploy to API Gateway after running
cdk deploy
.While it is possible to share a workaround implementation, it is difficult to implement an automatic
Deployment
creation that detects changes inResource
without increasing complexity in the current configuration.Therefore, we would like to propose adding a note to the documentation first.
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway-readme.html#breaking-up-methods-and-resources-across-stacks
The text was updated successfully, but these errors were encountered: