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

(vpc): vpc.fromLookup throwing error for subnets without subnetGroupNameTag #18883

Closed
tessmanjonathan opened this issue Feb 8, 2022 · 2 comments
Assignees
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@tessmanjonathan
Copy link

tessmanjonathan commented Feb 8, 2022

General Issue

Should we be requiring all subnets in a vpc to have the tag specified in subnetGroupNameTag?

The Question

It seems like in a recent change that was deployed in version 1.143.0, PR #18714 is requiring all subnets in a vpc to have all the same tags if you are using subnetGroupNameTag.

Example -
subnet-1: tags = No tags
subnet-2: tags = infra-group-tag

If we use:
ec2.Vpc.fromLookup(this, 'DefaultVPC', { subnetGroupNameTag: 'infra-group-tag' });

we are receiving the error:
Invalid subnetGroupNameTag: Subnet arn:aws:ec2:us-east-1:#####:subnet/subnet-1 does not have an associated tag with Key='infra-group-tag'

Should this be requiring subnet-1 to now have a tag called infra-group-tag?

Changing back and pinning aws-cdk to 1.142.0 allows us to deploy successfully.

CDK CLI Version

1.143.0

Framework Version

No response

Node.js Version

No response

OS

No response

Language

Python

Language Version

No response

Other information

No response

@tessmanjonathan tessmanjonathan added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Feb 8, 2022
@peterwoodworth
Copy link
Contributor

Yes, if you're using subnetGroupNameTag to help look up your vpc, then that tag should be present on all subnets 🙂 Seems this wasn't working properly before the PR you linked was merged

@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Feb 8, 2022
@peterwoodworth peterwoodworth added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 8, 2022
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants