AWS ECS problem

Job ID: 36589011

Budget: $10 – $11 USD

I am a student, I have a task on automation to upload a test application that is a docker image from an azure devops repository and connect it to AWS through ECR and ECS so that it provides me with a url that redirects me to my deployed docker container that is a simple html template with the message "Hello World", I already have almost everything done in terraform and in my YAML pipeline, however I have a problem to synchronize ECR with ECS because it asks me to create a target group with EC2 and gives it assign that destination group to a balancer defined and created previously in the same terraform file, I do all the configurations and when running the pipeline I get an error saying that the ip that I provide for the balancer is an ARN, so I need help to solve it and be able to deploy my docker in ECS and provide me with the URL to see the application, I attach images of the error, the code fraction in which the error appears and the file with the entire project to provide more context
Related categories: Amazon Web Services Docker DevOps Amazon ECS