我一直在尝试为我的两个vpc创建端点,它正在创建vpc,但是不能与我需要命名创建的vpc端点的Tags属性一起使用。
错误:“遇到了不受支持的属性标签”
{
"Resources": {
"VPCEndpoint1": {
"Type" : "AWS::EC2::VPCEndpoint",
"Properties" : {
"PrivateDnsEnabled" : "True",
"RouteTableIds" : ["rtb-1"],
"ServiceName" : "com.amazonaws.eu-west-1.s3",
"VpcEndpointType" : "Gateway",
"VpcId" : "vpc-id1",
"Tags": [
{
"Key": "Name",
"Value": "name1"
}
]
}
},
"VPCEndpoint2": {
"Type" : "AWS::EC2::VPCEndpoint",
"Properties" : {
"PrivateDnsEnabled" : "True",
"RouteTableIds" : ["rtb-2"],
"ServiceName" : "com.amazonaws.eu-west-1.s3",
"VpcEndpointType" : "Gateway",
"VpcId" : "vpc-id2",
"Tags": [
{
"Key": "Name",
"Value": "name2"
}
]
}
}
}
}
答案 0 :(得分:1)
Cloudformation不支持标签属性。
请参阅cloudformation文档=> https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html
答案 1 :(得分:0)
AWS :: EC2 :: VPC支持标签,但AWS :: EC2 :: VPCEndpoint不支持。
如果需要标签,请在vpc级别而不是端点上创建标签。
VPC级别标签-https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html