Fix to successfully destroy CDK due to VPC peering#1085
Open
lefkarag wants to merge 2 commits intoaws-samples:mainfrom
Open
Fix to successfully destroy CDK due to VPC peering#1085lefkarag wants to merge 2 commits intoaws-samples:mainfrom
lefkarag wants to merge 2 commits intoaws-samples:mainfrom
Conversation
deki
suggested changes
Aug 26, 2024
Contributor
deki
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run a pre destroy hook and delete the vpc peering using a script.