terraform-aws-ecs-service icon indicating copy to clipboard operation
terraform-aws-ecs-service copied to clipboard

service alb error

Open abdul14291 opened this issue 4 years ago • 1 comments

When i modify it according to my requirement it will give an error of service_elb_name

Modify according my requirement module "ecs_service" { source = "infrablocks/ecs-service/aws" version = "2.0.0"

vpc_id = "vpc-fb7dc365" # my vpc id

component = "important-component" deployment_identifier = "production"

service_name = "web-app" # my ecs-service-name service_image = "images/web-app:0.3.1" # my aws ecr url service_port = "8000" # port 80 service_command = "["node", "server.js"]" # comment this line

service_desired_count = "3" # 1 count service_deployment_maximum_percent = "50" service_deployment_minimum_healthy_percent = "200"

service_elb_name = "elb-service-web-app" # write my aws alb name

service_role = "arn:aws:iam::151388205202:role/service-task-role" # my service role

service_volumes = [ { name = "data" } ]

ecs_cluster_id = "arn:aws:ecs:eu-west-2:151388205202:cluster/web-app" # my cluster id ecs_cluster_service_role_arn = "arn:aws:iam::151388205202:role/cluster-service-role-web-app" # my cluster service role arn }

abdul14291 avatar Nov 19 '20 11:11 abdul14291

Hi there,

If you are using ALBs you need to pass the target_group_arn variable instead of the service_elb_name variable. The service_elb_name is for classic load balancers.

Thanks, Toby

tobyclemson avatar Nov 19 '20 11:11 tobyclemson