AWS just announced support for tagging of VPC Endpoints (Gateway Endpoints, Interface Endpoints, and Endpoint Services).
Tags can be used to search, filter, and organize VPC endpoints and endpoint services, but more importantly, tags can clearly organize the charges for these resources in the cost explorer and allow better cost attribution and chargebacks in environments with large shared accounts and multiple accounts.
resource "aws_vpc_endpoint" "s3" {
vpc_id = "${aws_vpc.main.id}"
service_name = "com.amazonaws.us-west-2.s3"
vpc_endpoint_type = "Gateway"
tags = {
Name = "S3 VPC Endpoint Gateway"
Environment = "production"
CostCenter = "abc"
ManagedBy = "terraform"
}
}
resource "aws_vpc_endpoint" "app_interface" {
vpc_id = "${aws_vpc.main.id}"
subnet_ids = ["${local.vpce_subnet_ids}"]
security_group_ids = ["${local.security_group_ids}"]
service_name = "${local.service_provider_name}"
vpc_endpoint_type = "Interface"
tags = {
Name = "Custom Service VPC Endpoint Interface"
Environment = "production"
CostCenter = "xyz"
ManagedBy = "terraform"
}
}
resource "aws_vpc_endpoint_service" "app_service" {
acceptance_required = false
network_load_balancer_arns = ["${aws_lb.test.arn}"]
tags = {
Name = "Custom Service VPC Endpoint Service"
Environment = "production"
CostCenter = "abc"
ManagedBy = "terraform"
}
}
We need this one so I'll take it on if nobody else has started.
Also update the associated data sources.
It looks like the tags on these resources are controlled via the EC2 DescribeTags
, CreateTags
and DeleteTags
APIs.
Better support in the EC2 API now available with AWS SDK v1.19.31:
Adding tagging support for VPC Endpoints and VPC Endpoint Services.
Requires:
Can this move forward now that the SDK update has been merged?
Hi, Any updates about it?
Any ideas on how this is going? Any ETA?
Support for tag management of VPC Endpoints has been merged and will release with version 2.16.0 of the Terraform AWS Provider, likely tomorrow. 👍
This has been released in version 2.16.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
Support for tag management of VPC Endpoints has been merged and will release with version 2.16.0 of the Terraform AWS Provider, likely tomorrow. 👍