以下是我在云形成网络负载均衡器模板中使用的代码,请您帮忙
"TargetGroup": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Name": "MyTargets",
"Port": 10,
"TargetType": "instance",
"Protocol": "TCP",
"TargetGroupAttributes": [{
"Key": "deregistration_delay.timeout_seconds",
"Value": "20"
}],
"VpcId": {
"Fn::Select": [
"0",
{
"Ref": "VPC"
}
]
},
"Targets": [ "Id", {"Ref": "Id.ins1" }, "Id", {"Ref": "Id.ins2"} ]
}
},
答案 0 :(得分:0)
您需要检查Targets的值。目标应该是TargetDescription的列表。 TargetDescription的语法:
{
"AvailabilityZone" : String,
"Id" : String,
"Port" : Integer
}
在您的情况下,将是这样的:
"Targets":[ { "Id":{ "Ref":"Id.ins1" },"Port":80 },{ "Id":{ "Ref":"Id.ins2" },"Port":80 } ]