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

EC2: Cross-account VPC peering connections #6826

Merged

Conversation

viren-nadkarni
Copy link
Contributor

@viren-nadkarni viren-nadkarni commented Sep 18, 2023

AWS allows VPCs to be peered as long as their CIDR ranges do not overlap. Peering can happen within the same account/region or cross-account/region.

#2195 added VPC peering support across-regions.

This PR introduces VPC peering support across-accounts.

Exisiting tests have been parametrised to run all assertions within the same account and across accounts.

Closes: localstack/localstack#8550

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Looks like the linter is failing: https://github.com/getmoto/moto/actions/runs/6224588248/job/16893138639

All tests that now patch os.environ will have to be skipped in ServerMode, otherwise they'll fail.

The logic itself looks good to me!

@viren-nadkarni viren-nadkarni marked this pull request as ready for review September 19, 2023 10:56
@viren-nadkarni viren-nadkarni marked this pull request as draft September 19, 2023 16:13
@viren-nadkarni viren-nadkarni marked this pull request as ready for review September 19, 2023 16:24
Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Awesome - thank you @viren-nadkarni!

@bblommers bblommers added this to the 4.2.3 milestone Sep 20, 2023
@bblommers bblommers merged commit 5f1fb65 into getmoto:master Sep 20, 2023
79 of 80 checks passed
@viren-nadkarni viren-nadkarni deleted the vpc-peering-cross-account-region branch September 20, 2023 07:23
@bblommers bblommers modified the milestones: 4.2.3, 4.2.4 Sep 22, 2023
toshyak pushed a commit to toshyak/moto that referenced this pull request Oct 26, 2023
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.

bug: Cross-account VPCs are not found when using multi-account features.
2 participants