-
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
(ec2.Vpc): Vpc.fromLookup should throw if subnet group name tag is explicitly given and does not exist #13962
Comments
This code does duplicate work. I wonder if not doing duplicate work will fix it:
|
@rix0rrr Sorry I made a typo in I supplied the wrong tag the Also this is very confusing:
I also updated to |
|
…licitly given and does not exist (#18714) Currently if `subnetGroupNameTag` is provided in `Vpc.fromLookup()` and a tag with that key does not exist, the error that is returned is very generic and just indicates that the VPC could not be found. This makes it very hard to troubleshoot what the real issue is (invalid subnetGroupNameTag). Now if the user provides a `subnetGroupNameTag` and a tag with that Key does not exist an error is thrown indicating that an invalid `subnetGroupNameTag` was provided fixes #13962 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…licitly given and does not exist (aws#18714) Currently if `subnetGroupNameTag` is provided in `Vpc.fromLookup()` and a tag with that key does not exist, the error that is returned is very generic and just indicates that the VPC could not be found. This makes it very hard to troubleshoot what the real issue is (invalid subnetGroupNameTag). Now if the user provides a `subnetGroupNameTag` and a tag with that Key does not exist an error is thrown indicating that an invalid `subnetGroupNameTag` was provided fixes aws#13962 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I suspect this may be a bug or I'm missing something.
I have an existing VPC with 6 subnets with a tag
subnet_tier
From my understanding of
Vpc.from_lookup
I can supplysubnet_group_name_tag
will assign the subnets to the correct group insidecdk.context.json
So I can then create a
SubnetSelection
expected by multiple resources (eg.Function
)So when I add following code in my stack I get an error.
Actual result
cdk.context.json
is created with SubnetGroupsError message raised:
Expected result
No errors.
Environment
The text was updated successfully, but these errors were encountered: