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

Fix to successfully destroy CDK due to VPC peering #1085

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lefkarag
Copy link
Contributor

Run a pre destroy hook and delete the vpc peering using a script.

Copy link
Contributor

@deki deki left a comment

Choose a reason for hiding this comment

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

setup-vpc-peering.sh was already a hacky solution and instead of adding more debt to it, I'd recommend to move the peering connection to CDK or CloudFormation so people can just delete the stack as part of the destroy.

It's fine to have an additional stack for now that just imports the values and creates/ accepts the peering connection and creates the routes. CDK doesn't have a L2 construct as of today (aws/aws-cdk#9338), so either CfnVPCPeeringConnection or AWS::EC2::VPCPeeringConnection in plain CloudFormation would be the way to go here.

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.

2 participants