AWS CloudFormation支持标签AWS :: EC2 :: VPCEndpoint的属性属性

问题描述 投票:0回答:2

我一直在尝试为我的两个vpc创建端点,它正在创建vpc,但是无法与我需要命名创建的vpc端点的Tag属性一起使用。

错误:“遇到了不受支持的属性标签”

{
  "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"
                    }
                ]
            }
        }
    }
}

amazon-web-services tags amazon-cloudformation key-value vpc
2个回答
0
投票

Cloudformation不支持标签属性。

请参阅cloudformation文档=> https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html


0
投票

AWS :: EC2 :: VPC支持标签,但AWS :: EC2 :: VPCEndpoint不支持。

[如果需要标签,请在vpc级别而不是端点上创建标签。

VPC级别标签-https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html

© www.soinside.com 2019 - 2024. All rights reserved.