-
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] Vpc.fromLookups() should be able to locate x-env VPCs just like Vpc.fromAttributes() can #10208
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
Comments
This seems overly trivial to support, I have a PR here: #16728, let me know if I missed something |
mergify bot
pushed a commit
that referenced
this issue
Oct 25, 2021
- Currently Vpc.fromLookup will default to the Stack's region, when needing to lookup Stack's from other regions (e.g. for VPC peering) this doesn't work and the only other work around is a custom resource - The lookup provider already supports passing a region and works fine if you pass one that's not the Stack's inferred region, so just propagate that option to the top level - Fixes #10208 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
TikiTDO
pushed a commit
to TikiTDO/aws-cdk
that referenced
this issue
Feb 21, 2022
- Currently Vpc.fromLookup will default to the Stack's region, when needing to lookup Stack's from other regions (e.g. for VPC peering) this doesn't work and the only other work around is a custom resource - The lookup provider already supports passing a region and works fine if you pass one that's not the Stack's inferred region, so just propagate that option to the top level - Fixes aws#10208 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
We are trying to lookup a VPC that is created in another stack. We are able to find the VPC if it's in the same region however, if the vpc is in another region we are unable to find it and an error gets thrown.
Reproduction Steps
vpc = aws-ec2.Vpc.from_lookup(self, id='second_vpc', vpc_id=second_vpc_id, is_default=False)
or
vpc = aws-ec2.Vpc.from_lookup(self, id='second_vpc', vpc_name='second-vpc', is_default=False)
What did you expect to happen?
What actually happened?
Error got thrown:
Could not find any VPCs matching {"account":"324xxxxxxx","region":"eu-west-2","filter":{"vpc-id":"vpc-7xxxxxxx","isDefault":"false"},"returnAsymmetricSubnets":true} Found errors
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: