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

ec2: add support for tags for Gateway Endpoint #31004

Open
2 tasks
jalencato opened this issue Aug 1, 2024 · 4 comments
Open
2 tasks

ec2: add support for tags for Gateway Endpoint #31004

jalencato opened this issue Aug 1, 2024 · 4 comments
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. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2

Comments

@jalencato
Copy link

jalencato commented Aug 1, 2024

Describe the feature

For s3_gateway_endpoint, we hope we can add a tag value for the it.

Use Case

We hope to get the problem done by this way to add a value to the gateway endpoint.

vpc = ec2.Vpc.from_lookup(self, "VPC", is_default=True)
s3_gateway_endpoint = vpc.add_gateway_endpoint(
                    "ExampleCdkStackS3Endpoint",
                    service=ec2.GatewayVpcEndpointAwsService.S3,
                    tags= {"Name", "test"}
                )

Proposed Solution

No response

Other Information

Any other api can also be workable.

FYI, I tried to use cdk.tags but failed, I used the code like:

Tags.of(s3_gateway_endpoint.node).add("Name", f"{stack_config.stack_prefix}-s3-gateway")

But I did not see it works here.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.131.0

Environment details (OS name and version, etc.)

Mac Sonama 14.5

@jalencato jalencato added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 1, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Aug 1, 2024
@ashishdhingra ashishdhingra changed the title (module name): (short issue description) ec2: add support for tags for Gateway Endpoint Aug 1, 2024
@ashishdhingra ashishdhingra self-assigned this Aug 1, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 1, 2024
@ashishdhingra
Copy link
Contributor

Findings:

  • Looking at CreateVpcEndpoint, it appears to specify TagSpecification.
  • AWS Console also appears to have UI for specifying tags during endpoint creation.
  • CloudFormation guide for AWS::EC2::VPCEndpoint doesn't have any property named Tags (similar to AWS::EC2::VPCPeeringConnection).
  • [CloudFormation resource specification](CloudFormation resource specification) also doesn't mention about Tags being supported.
  • aws-ec2-vpcendpoint.json specifies the resource as not taggable.

Need to reach out to CloudFormation team.

@ashishdhingra ashishdhingra added needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. effort/medium Medium work item – several days of effort labels Aug 1, 2024
@ashishdhingra
Copy link
Contributor

Created internal ticket for CloudFormation team: P145664622

@ashishdhingra ashishdhingra removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Aug 1, 2024
@ashishdhingra ashishdhingra removed their assignment Aug 1, 2024
@ashishdhingra
Copy link
Contributor

Response from CloudFormation support:

This is a known limitation of the AWS::EC2::VPCEndpoint resource, the CloudFormation resource Uluru handler currently does not support tagging. CDK functionality is generally limited to CloudFormation functionality, so as tagging is not supported for this resource in CFN, it is not supported in CDK.

There is an open public request to have tagging be supported for this resource here: aws-cloudformation/cloudformation-coverage-roadmap#196

@jalencato As a workaround, you may use custom resource to add tags to VPC Endpoint.

@jalencato
Copy link
Author

I will give it a try.

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. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2
Projects
None yet
Development

No branches or pull requests

2 participants