如何获取云形成模板中指定的ECS实例ID tp?

I am building a cloud formation template(YML format) for my ECS service and stuck in load-balancer target group, it was not able to attach to my ECS instance and trying to add Targets by referring this official AWS docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html

以下是我的目标组,当我多次停止启动(终止)实例时,我的实例ID一直在变化并且不是静态的,例如VPC或子网ID,以及如何在ID字段中动态构建值目标?

TargetGroup:
    Type: AWS::ElasticLoadBalancingV2::TargetGroup
    Properties: 
      Matcher: 
       HttpCode: "200"
      Name: "foo"
      Port: "8080"
      Protocol: "HTTP"
      Targets:
        Id: String // This I need to build dynamically
        Port: 8080
      TargetType: "instance"
      UnhealthyThresholdCount: 3
      VpcId: "vpc-79251d11"            

Note: I tried search for EC2 resources and found this https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2.html but it didn't help me. Also I am using ASG and LC to create my ECS instance.