Cloudformation错误:"模板验证错误:模板参数属性无效' VPC'"

时间:2015-12-14 10:26:34

标签: json amazon-web-services amazon-cloudformation

我有一个大的cloudformation json模板,并尝试添加VPC。 当我添加VPC时出现此错误:

  

模板验证错误:模板参数属性无效' VPC'

这里我在资源中使用VPC的地方:

"VPC": {
            "Type": "AWS::EC2::VPC",
            "Properties": {
                "CidrBlock": "String",
                "EnableDnsSupport": true,
                "EnableDnsHostnames": true,
                "Tags": [
                    {"Key": "Name", "Value": {"Fn::Join": ["", [{"Ref": "Env"}, "-VPC"]]}, "PropagateAtLaunch": true}
        ]
            }
        }

我在属性中的Loadbalancers,SecurityGroups PrivateSubnet,PublicSubnet中使用" VpcId":{" Ref":" VPC"}。 这是参数中的VpcId:

"VpcId" : {
            "Type" : "String",
            "Description" : "VpcId of your existing Virtual Private Cloud (VPC)."
        }

我这里没有做一些非常特别的事情,但是对于使用cloudformation创建堆栈的错误输出仍然有点困惑。 谁能告诉我,我在这里做错了什么?

这是整个模板link(没有重要的凭据)。 谢谢!

2 个答案:

答案 0 :(得分:4)

看起来你需要关闭"参数"阻止"资源"阻止所以CFN尝试创建一个名为" Resources"有财产" VPC"

答案 1 :(得分:0)

根据模板看起来一切都应该正常工作。你还得到同样的问题吗?