【发布时间】:2017-05-30 17:57:11
【问题描述】:
嗨,我希望有人可以帮助告诉我我做错了什么。我正在编写一个仅将 VPN 网关添加到 VPC 的 CF 模板。无需更新路由表等。
我正在使用下面的模板,但我收到一个错误,我无法完全看出问题所在,我认为多加一双眼睛可能会有所帮助! : 模板验证错误:模板格式错误:每个资源对象都必须包含一个类型成员。
模板:
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "CF Just add a VPN Gateway to a VPC ",
"Parameters" : {
"targetVPCtoAttachGatewayTo" : {
"Description" : "VPC ID to attach VPN Gateway",
"Default" : "vpc-xxxxx",
"Type": "AWS::EC2::VPC::Id"
}
},
"Resources" : {
"VPNGateway" : {
"Type" : "AWS::EC2::VPNGateway",
"Properties" : {
"Type" : "ipsec.1",
"Tags" : [
{"Key": "Name", "Value": {"Fn::Join": ["",["Virtual Private Gateway for ", { "Ref": "targetVPCtoAttachGatewayTo"} ] ]}}]
}
},
"AttachVpnGateway" : {
"Type" : "AWS::EC2::VPCGatewayAttachment",
"DependsOn" : "VPNGateway",
"Properties" : {
"VpcId" : { "Ref" : "targetVPCtoAttachGatewayTo" },
"VpnGatewayId" : { "Ref" : "VPNGateway" }
}
},
"Outputs" : {
}}}
【问题讨论】:
标签: amazon-vpc amazon-cloudformation