I’m trying to put an ELB in from of my ECS service, using this terraform file
But applying it, gives the below error. Any ideas on the setup that I’ve gotten wrong?
$ terraform apply ...
aws_ecs_task_definition.beatthemarket-task: Refreshing state... (ID: beatthemarket)
aws_ecs_cluster.default: Refreshing state... (ID: arn:aws:ecs:us-west-1:186598327969:cluster/beatthemarket)
aws_iam_role.beathemarket-role: Refreshing state... (ID: beathemarket-role)
aws_elb.beathemarket-elb: Refreshing state... (ID: beathemarket-elb)
aws_ecs_service.beatthemarket_service: Creating...
cluster: "" => "arn:aws:ecs:us-west-1:186598327969:cluster/beatthemarket"
deployment_maximum_percent: "" => "200"
deployment_minimum_healthy_percent: "" => "100"
desired_count: "" => "1"
iam_role: "" => "arn:aws:iam::186598327969:role/beathemarket-role"
load_balancer.#: "" => "1"
load_balancer.2282006059.container_name: "" => "beatthemarket_service"
load_balancer.2282006059.container_port: "" => "8080"
load_balancer.2282006059.elb_name: "" => "beathemarket-elb"
name: "" => "beatthemarket-service"
task_definition: "" => "arn:aws:ecs:us-west-1:186598327969:task-definition/beatthemarket:2"
Error applying plan:
1 error(s) occurred:
* aws_ecs_service.beatthemarket_service: InvalidParameterException: The container beatthemarket_service does not exist in the task definition.
status code: 400, request id: 67ef4ee6-08e8-11e6-9b7a-95aa41386391