aws_apigateway: remove auto-generated `CfnOutput` for `RestApi`
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
There's an inconsistency in how CDK handles deployments for API constructs in the two API Gateway modules:
* **aws_apigateway (v1):** When creating a `RestApi`, CDK automatically generates a `CfnOutput` during deployment. This behavior is unexpected.
* **aws_apigatewayv2:** When creating a `HttpApi` or `WebSocketApi`, no such output is generated.
### Expectation
I expected the `RestApi` from `aws_apigateway` to function similarly to `HttpApi` and `WebSocketApi` from `aws_apigatewayv2`.
### Proposed Solution
I propose aligning the behavior of all API constructs. Ideally, the `RestApi` construct from `aws_apigateway` module should not generate a `CfnOutput` by default, mirroring the behaviour of `HttpApi` and `WebSocketApi` constructs from `aws_apigatewayv2` module. This would provide a more consistent development experience when using CDK with different API types.
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.77
### Environment details (OS name and version, etc.)
Ubuntu 22.04 LTS
Contributor guide
Research direction
Start by comparing the RestApi construct in aws_apigateway with the HttpApi and WebSocketApi constructs in aws_apigatewayv2. Remove the default CfnOutput behavior for RestApi and verify that deployments no longer generate it while the other API constructs retain their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- api, cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100