From 8ac077022eddeb0c2b7b6f5cd58860b5dcafd69f Mon Sep 17 00:00:00 2001 From: KensoDev Date: Tue, 4 Apr 2017 13:02:05 -0700 Subject: [PATCH] some comments explaining the reason --- builtin/providers/aws/resource_aws_ecs_service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/providers/aws/resource_aws_ecs_service.go b/builtin/providers/aws/resource_aws_ecs_service.go index b541e7665..eee8ddf06 100644 --- a/builtin/providers/aws/resource_aws_ecs_service.go +++ b/builtin/providers/aws/resource_aws_ecs_service.go @@ -511,6 +511,8 @@ func resourceAwsEcsLoadBalancerHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) + // There are 2 types of load balancers: ELB/ALB + // In case of ELB `elb_name` is expected and for ALB `target_group_arn` is. optionalLoadBalancerParams := []string{"target_group_arn", "elb_name"} for i := range optionalLoadBalancerParams {