Skip to content
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

Update cdk to v2 #193

Merged
merged 5 commits into from
Apr 28, 2022
Merged

Update cdk to v2 #193

merged 5 commits into from
Apr 28, 2022

Conversation

fredericbarthelet
Copy link
Collaborator

@fredericbarthelet fredericbarthelet commented Apr 27, 2022

This PR upgrades CDK from v1 to v2.
This considerably reduces the quantity of library in Lift dependencies. It also resolves L1 version conflict among various packages.

CDK migration guide was used to perform this upgrade.

The resulting dependencies includes :

  • aws-cdk-lib for all constructs libraries
  • constructs to be able to reference Construct interface
  • @aws-cdk/aws-apigatewayv2-alpha required for the Webhook construct in order to provision an HttpApi, which was already in alpha in CDK v1, and remains in alpha in CDK v2

A few tests were adjusted to accommodate this update :

  • securityGroupName property on SecurityGroup construct was deprecated in favor of securityGroupId. This affects the generated Cloudformation intrinsic function used to reference such resource.
  • CloudFront minimum TLS requirements were upgraded from TLSv1.2_2019 to TLSv1.2_2021

In addition, the new bootstrap version check enabled by CDK v2 was disabled implicitly following this guideline

AWS CDK v2 also removes support for node 10 and 12. Node 10 support was already removed from Lift, however this change will prevent users currently using Lift with node 12 to upgrade.

In order to provision AWS Provider VPC configuration, reference to
security group was made using securityGroupName property from Security
Group CDK construct. This property is deprecated and was replaced with
the use of securityGroupId which generate a different Cloudformation
intrinsic function
Copy link
Member

@mnapoli mnapoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@fredericbarthelet
Copy link
Collaborator Author

Thanks @mnapoli and @t-richard for your reviews. i however had to add an additional commit afterwards removing support for Node 12, as such node version is not supported by CDK v2. Do you agree with dropping support for Node 12 (end of life for Node 12 is due in 3 days -> https://nodejs.org/en/about/releases/)

@mnapoli
Copy link
Member

mnapoli commented Apr 28, 2022

👍 sounds good!

@t-richard
Copy link
Contributor

Seems fine to me too. Node 12 is EOL and most projects using Lift are probably recent projects using Node 14 already.

@fredericbarthelet
Copy link
Collaborator Author

Great, thanks for the feedbacks :). Merging and releasing with a changelog mentioning the summary of the BC above.

@fredericbarthelet fredericbarthelet merged commit 7b1a3f7 into master Apr 28, 2022
@fredericbarthelet fredericbarthelet deleted the update-cdk-to-v2 branch April 28, 2022 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants