I'm using AWS/Terraform with ECS and I have a set up where I have multiple AWS accounts that all need access to Docker images contained in ECR in separate AWS account.
In the separate AWS account (the one with the Docker images in ECR) I have created a user with an Access Key (ID & secret).
In my other AWS accounts I have ECS Task Definitions where I can specify the location of the Docker image, however, when I run the task it requires access to the other account to be able to pull the image.
How can I specify in my Terraform ECS task definition that to pull the Docker image from the other account that it needs to authenticate with the Access Key of the user in that other account?