cdk migrate: FooBarStack could not be generated because VpcId is not a valid property for resource EC2NatGatewayNNN of type AWS::EC2::NatGateway #30872
Labels
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
package/tools
Related to AWS CDK Tools or CLI
Describe the bug
Attempting to migrate some deployed resources, the command returns the error:
Migrate failed for 'FooBar': FooBarStack could not be generated because VpcId is not a valid property for resource EC2NatGatewayNNN of type AWS::EC2::NatGateway.
The command executed is as follows:
cdk migrate -n FooBar -l java --from-scan new --ignore-errors
Expected Behavior
Generate a CDK stack
Current Behavior
Migrate failed with message:
Migrate failed for 'FooBar': FooBarStack could not be generated because VpcId is not a valid property for resource EC2NatGatewayXXX of type AWS::EC2::NatGateway.
Reproduction Steps
Run
cdk migrate -n FooBar -l java --from-scan new --ignore-errors
on an account where a NAT gateway is present.Possible Solution
No workaround found.
Additional Information/Context
No response
CDK CLI Version
2.149.0 (build c8e5924)
Framework Version
No response
Node.js Version
v20.15.1
OS
macOS 14.5
Language
Java
Language Version
Java (21)
Other information
No response
The text was updated successfully, but these errors were encountered: