是的,AWS CloudFormation支持AWS::EC2::VPCEndpoint的Tags属性。您可以在CloudFormation模板中使用AWS::EC2::VPCEndpoint资源来创建VPCEndpoint,并在资源属性中定义Tags。
以下是一个示例CloudFormation模板,展示了如何在VPCEndpoint资源中定义Tags属性:
Resources:
MyVPCEndpoint:
Type: AWS::EC2::VPCEndpoint
Properties:
ServiceName: com.amazonaws..ec2
VpcId:
SubnetIds:
-
Tags:
- Key: Name
Value: MyVPCEndpoint
- Key: Environment
Value: Production
在上面的示例中,您可以将
替换为您的AWS区域,
替换为您的VPC ID,
替换为您的子网ID。在Tags属性中,您可以定义多个标签,每个标签都包含Key和Value属性。
请注意,上述示例中的com.amazonaws.
是EC2服务的默认终端节点服务名称。您可以根据您要连接的服务的名称来更改ServiceName属性。
使用上述CloudFormation模板创建堆栈后,您将在创建的VPCEndpoint资源上看到定义的标签。