-
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
aws-ec2: Getting Cannot delete export though no changes in VPC stack #33395
Comments
Can you share your vpc stack? How do you create the vpc and share its CidrBlock? Also, when you run |
OK I see some potential issue here: This is essentially a cross-stack reference for Vpc CidrBlock. The key issue is in how CDK generates the export name. Looking at the code in
So when you synthesize the EKS stack:
I'll bring it up to the team for further inputs and investigation. |
Hi @pahud , Thanks for your swift response and digging into the issue. Here are the answers for questions,
Please let me know if needed additional details. Thanks, |
@RambabuPatina Thank you for the report. While my assumption above might be valid, we still need a minimal code snippet to reproduce that on our end before we are able to address the root cause and get it fixed. Any chance would you help us provide minimal code snippet that we can simply paste into our IDE and reproduce this error? I will try to build one on my end though. This ensures we are aligned on the same code snippets. |
Describe the bug
Hi Team,
We have two AWS CDK stacks: the VPC stack, which provisions the VPC, subnets, and related networking resources, and the EKS stack, which creates the EKS cluster and a security group to allow access to an EFS file system. To enable this, we pass VPC details from the VPC stack to the EKS stack and use the VPC CIDR range to configure security group ingress rules.
On re-deployment we are getting below error, however it is reproducible in one account consistently but not in other account.
xxxxxx-dev-vpc-stack Delete canceled. Cannot delete export xxxxxxxx-dev-vpc-stack:ExportsOutputFnGetAttxxxxxxxxdevvpcstackVpcConstructxxxxvpcxxxxxxxxdevvpcstackVpcxxxxvpc480918FACidrBlock07D1D2D0 as it is in use by xxxxxxxx-dev-eks-cluster
We observed that the CloudFormation export for CidrBlock from the VPC stack is being used in the EKS stack. However, despite no changes in the VPC stack, CloudFormation attempts to update the export name for CidrBlock, which is unexpected. This behavior is surprising, and we are unsure of the reason. Do you know if this is a known issue or if there is an explanation for this behavior?
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
It should not update the cfn export name for 'CidrBlock'
Current Behavior
It is updating the cfn export name for 'CidrBlock' which causing VPC stack deployment failure
Reproduction Steps
(Note: This is consistently reproducible in one account but not in other account. Not sure why VPC stack is trying to update the export name for 'CidrBlock')
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.172.0 (build 0f666c5)
Framework Version
No response
Node.js Version
18.x
OS
MacOs
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: