In my terraform code, I am trying to attach an auto-scaling group to my ECS Service using aws_autoscaling_target
.
resource "aws_appautoscaling_target" "service_app_asg_target" {
resource_id = "${aws_ecs_service.service_app.arn}"
min_capacity = 2
max_capacity = 6
role_arn = "${aws_iam_role.ecs_autoscale_role.arn}"
}
When I apply this, amazon gives me the error
Unsupported service namespace, resource type or scalable dimension
What's wrong with my attachment?