(vpc): vpc.fromLookup throwing error for subnets without subnetGroupNameTag #18883
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.
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
The text was updated successfully, but these errors were encountered: