(aws-ec2): Add support for ENI tagging in VPC Interface Endpoints
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
Currently, when creating Interface VPC Endpoints using the L2 construct ec2.InterfaceVpcEndpoint, there is no way to tag the automatically created Elastic Network Interfaces (ENIs).
While the Tags.of(endpoint).add() method allows tagging of the VPC endpoint itself, it does not propagate these tags to the ENIs. It would be extremely beneficial in adding native support for ENI tagging within the L2 construct, similar to how Auto Scaling Groups can propagate tags to EC2 instances.
### Use Case
Many organizations have mandatory tagging policies enforced through SCPs that require all resources, including ENIs, to have specific tags for cost allocation, compliance, etc. Currently, users must resort to complex workarounds involving L1 constructs (CfnVPCEndpoint) and custom resources with Lambda functions to properly tag these ENIs.
### Proposed Solution
// Simplified L2 construct with ENI tagging support
const endpoint = new ec2.InterfaceVpcEndpoint(stack, 'Endpoint', {
vpc,
service: ec2.InterfaceVpcEndpointAwsService.SECRETS_MANAGER,
tagOptions: {
propagateTagsToEni: true, // New property
eniTags: { // Optional additional ENI-specific tags
'resource-type': 'endpoint-eni'
}
}
});
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.201.0
### AWS CDK CLI version
2.1019.1
### Environment details (OS name and version, etc.)
macOS Sequoia 15.5
Contributor guide
Research direction
Read the ec2.InterfaceVpcEndpoint L2 construct and its CfnVPCEndpoint path, then compare how Tags.of(endpoint) currently applies tags. Done means providing native support for tagging the automatically created ENIs, including any proposed propagation and ENI-specific tag behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100