1

Everytime I try to add another TragetGroupArn on the service resource in the cloudformation stack it provides me this error stating:

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'

Can anybody let me known why is The TargetGroupArn not Permitted when I add the second target grop.

Varun Nair
  • 47
  • 4

0 Answers0