If you try to attach an auto-scaling group to an ECS service and you get
Unsupported service namespace, resource type or scalable dimension
Then it's possible you didn't correctly format the resource_id in your aws_appautoscaling_target. It needs to be in the format service/clusterName/serviceName, and terraform will not format it for you. Try:
resource_id = "service/${aws_ecs_cluster.MY_CLUSTER.name}/${aws_ecs_service.MY_SERVICE.name}"
Thanks