-
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
❗Notice: (apigateway): API Gateway released new resource DomainNameV2 causing conflicts in L1 generation #32296
Comments
The final solution we decided is to delete For users who use HTTP API L1 Construct in
This solution will guarantee no resource replacement or update as the generated CloudFormation template should be exactly the same as before. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
…odule (aws#32297) ### Issue # (if applicable) Closes aws#32296 ### Reason for this change As a summary, CDK `aws-apigateway` module had a legacy file called `apigatewayv2.ts` which includes CDK L1 Constructs from API Gateway V2 resource like `CfnDomainNameV2`. We've already moved everything here to aws-apigatewayv2 module. However, we had to keep the legacy file for backward compatibility issue and every Constructs in the file were marked as `deprecated` 5 years ago. Now API Gateway team has released a new AWS resource called DomainNameV2 in API Gateway. The default CDK generated name would be CfnDomainNameV2 in aws-apigateway module but this name collides with the legacy CfnDomainNameV2 Construct from apigatewayv2.ts file (supposedly for APIGatewayV2). This is causing the L1 generation tool to fail because the new resource by API Gateway is also caused `CfnDomainNameV2`. ### Description of changes Delete the deprecated `apigatewayv2.ts` file entirely. ### Description of how you validated changes Existing users on upgrade won't be able to deploy their template without knowing the change because the property for the `APIGateway::DomainNameV2` resource is different from `APIGatewayV2::DomainName` resource, so the template would be non-deployable. Verified that if existing users who use `CfnDomainNameV2` from `aws-apigateway` module and update to use the same Construct from `aws-apigatewayv2` module, it will generate the exact same output CFN template so it won't cause any resource replacement or downtime. There's only 76 users who used `CfnApiV2` from `aws-apigateway` module based on Analytics. All these users were on CDK V1 so if they choose to upgrade to latest version, they need to fix a bunch of breaking changes anyway. ### 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) BREAKING CHANGE: We will be removing deprecated `APIGatewayV2` constructs from `aws-apigateway` module. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
As a summary, CDK
aws-apigateway
module had a legacy file calledapigatewayv2.ts
which includes CDK L1 Constructs from API Gateway V2 resource likeCfnDomainNameV2
. We've already moved everything here to aws-apigatewayv2 module. However, we had to keep the legacy file for backward compatibility issue and every Constructs in the file were marked asdeprecated
5 years ago.Now API Gateway team has released a new AWS resource called DomainNameV2 in API Gateway. The default CDK generated name would be CfnDomainNameV2 in aws-apigateway module but this name collides with the legacy CfnDomainNameV2 Construct from apigatewayv2.ts file (supposedly for APIGatewayV2).
This is causing the L1 generation tool to fail because the new resource by API Gateway is also caused
CfnDomainNameV2
.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The new resource should be generated correctly
Current Behavior
It won't generate because of the name conflicts. We can either
Reproduction Steps
N/A
Possible Solution
CfnApiGatewayDomainNameV2
. This is weird and confusing name. More importantly, if API Gateway team decides to introduce more resource under API Gateway but named it V2, we will need to add more manual patches.APIGatewayV2::DomainName
resource can't deploy with at least oneDomainNameConfigurations
property (even though this property says not required on CFN documentation, CFN deploy will throw an error). AndApiGateway::DomainNameV2
resource doesn't have the same property so users won't be able to update to the latest CDK version and deploy unknowingly successfully. I also verified that if they update to use the same Construct fromaws-apigatewayv2
module, it will generate the exact same output CFN template so it won't cause any resource replacement or downtime.Additional Information/Context
No response
CDK CLI Version
N/A
Framework Version
No response
Node.js Version
N/A
OS
N/A
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: