Open richardgavel-ordinaryexperts opened 2 days ago
Reproducible using below template (saved locally with name template-1727389237339.yaml
):
gives the below error using command cdk migrate --stack-name CDK-Local-Template-Migrate-Demo --language typescript --from-path ./template-1727389237339.yaml
:
This command is an experimental feature.
❌ Migrate failed for `CDK-Local-Template-Migrate-Demo`: CdkLocalTemplateMigrateDemoStack could not be generated because LocalIpv4NetworkCidr is not a valid property for resource VPNConnection of type AWS::EC2::VPNConnection
CdkLocalTemplateMigrateDemoStack could not be generated because LocalIpv4NetworkCidr is not a valid property for resource VPNConnection of type AWS::EC2::VPNConnection
Somehow, in CloudFormation application composer, error message Property LocalIpv4NetworkCidr is not allowed.yaml-schema: Resources(0)
is displayed.
Describe the bug
See error above.
The property in question is in the CF documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html and in the L1 construct https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPNConnection.html. However, it looks like you depend on a library cdklabs/cdk-from-cfn which does not have the property in its https://github.com/cdklabs/cdk-from-cfn/blob/main/src/specification/cdk-resources.json file.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Migration occurs
Current Behavior
Dev1ApplicationStackStack could not be generated because LocalIpv4NetworkCidr is not a valid property for resource VPNConnection of type AWS::EC2::VPNConnection [12:16:45] Error: Dev1ApplicationStackStack could not be generated because LocalIpv4NetworkCidr is not a valid property for resource VPNConnection of type AWS::EC2::VPNConnection at generateStack (/usr/lib/node_modules/aws-cdk/lib/index.js:471:151618) at CdkToolkit.migrate (/usr/lib/node_modules/aws-cdk/lib/index.js:473:4355) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async exec4 (/usr/lib/node_modules/aws-cdk/lib/index.js:526:54490)
Reproduction Steps
cdk migrate on a stack that includes a VPN Connection
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.160.0
Framework Version
No response
Node.js Version
v18.20.4
OS
Ubuntu
Language
TypeScript
Language Version
No response
Other information
No response