How to get all image tag of ECR using terraform data source

I have an ECR repository named workflow and in this repository, there is 5 image pushed using GitHub action.

Now I have a terraform workflow that will just use the image from ECR and using this ECR image builds the ECS container definition.

so now I want to fetch the latest image with the tag whatever it would be…

so how can I pass the latest or newest image with the tag?
or if somehow i get the all image then i loop over the tag assign new one