微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法将我的 ECS 服务更新为通过 cloudformation 进行蓝绿部署的两个目标组

如何解决无法将我的 ECS 服务更新为通过 cloudformation 进行蓝绿部署的两个目标组

每次我尝试在 cloudformation 堆栈中的服务资源上添加一个 TragetGroupArn 时,它都会向我提供此错误说明:

Resource handler returned message: "Model validation Failed (#: extraneous key [TragetGroupArn] is not permitted)" (RequestToken: 6a6f647e-e5e2-9481-eb46-a909a7780fc0,HandlerErrorCode: InvalidRequest)



service:
    Type: AWS::ECS::Service
    DependsOn: 
      - ALBListener
      #- ECSAutoScalingGroup
Properties:
      Cluster: !Ref 'ECSCluster'
      DesiredCount: !Ref 'DesiredCapacityTASK'
      HealthCheckGracePeriodSeconds: 2147483647
      #DeploymentController:
        #Type: CODE_DEPLOY
      DeploymentConfiguration:
        DeploymentCircuitBreaker:
          Enable: True
          Rollback: True
        MaximumPercent: 200
        MinimumHealthyPercent: 100
      PlacementStrategies:
        - Type: spread
          Field: instanceId
        - Type: spread
          Field: attribute:ecs.availability-zone
      #PlacementConstraints:
      LoadBalancers:
      - ContainerName: drupal
        ContainerPort: '443'
        TargetGroupArn: !Ref 'ECSTGproduction'
      - ContainerName: drupal
        ContainerPort: '443'
        TragetGroupArn: !Ref 'ECSTGtesting'
        #LoadBalancerName: !GetAtt ECSALB.LoadBalancerName
        #LoadBalancerName: ECSALB
      #NetworkConfiguration:
      #  AwsvpcConfiguration:
      #    AssignPublicIp: ENABLED
      #    SecurityGroups:
      #      - !Ref 'EcsSecurityGroup'
      #    subnets: !Ref 'subnetId'
      #ServiceName: Ecs
      #Role: !Ref 'ECSServiceRole'
      TaskDeFinition: !Ref 'taskdeFinition'

谁能告诉我为什么在添加第二个目标组时不允许使用 TargetGroupArn。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。