-
Notifications
You must be signed in to change notification settings - Fork 4.1k
(aws-cdk/api-gateway): No way to create a BasePathMapping that does not point to a stage #15806
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
Comments
We also ran into this issue. We're working around it by pulling the child CfnBasePathMapping and setting the stage to undefined. |
The constructor for the Have you tried using that? |
Hi, Niranjan. Unfortunately, if Andrey Lipatkin. |
Thanks Andrey. Adding this to our backlog. Unfortunately, we're unable to work on this right now. We use +1s and community feedback to evaluate its prioerity. |
Closes #15806 Creates a new prop `attachToStage` to `BasePathMappingOptions` to allow a base path mapping to be created without a stage. Setting `stage` to `undefined` does not work, as in this case the default stage will be used. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/INTEGRATION_TESTS.md)? * [ ] 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*
|
Closes aws#15806 Creates a new prop `attachToStage` to `BasePathMappingOptions` to allow a base path mapping to be created without a stage. Setting `stage` to `undefined` does not work, as in this case the default stage will be used. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/INTEGRATION_TESTS.md)? * [ ] 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*
Closes aws#15806 Creates a new prop `attachToStage` to `BasePathMappingOptions` to allow a base path mapping to be created without a stage. Setting `stage` to `undefined` does not work, as in this case the default stage will be used. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/INTEGRATION_TESTS.md)? * [ ] 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*
According to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html it is possible to create mappings that do not point to any stage and point to REST API only. Current
BasePathMapping
construct does not allow this (see code snippet below).Use Case
I have a production REST API that was created some time ago using CDK 1.45.0. In that version default base path mapping was created without stage specified, so all API users specify stage name as a part of the request URL. When upgrading to v1.115 I could not find a way to keep mapping the same using CDK, had to clone the construct into my project and patch it.
Proposed Solution
No good ideas. Maybe new static methods:
BasePathMapping.fromRestApi
(same logic as the current constructor)BasePathMapping.fromRestApiAndStage
(allow to passundefined
value forstage
into CFN) methods?Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: