Attribute to retrieve ECR login credentials #11332
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/ecr
Issues and PRs that pertain to the ecr service.
Milestone
Community Note
Description
During the creation of a repository on an Amazon Elastic Container Registry (ECR) it would be very helpful to have a way to retrieve the login credential for the newly created registry. I've noticed two related pull requests (#3145, #2824) that propose a new data source to retrieve this information, but they appeared to be closed without being merged to master.
What is the reason why those pull requests were closed? Is there a better way to retrieve the login credentials?
My use case is the following:
aws_ecr_repository
For now, as a workaround, I pass the registry id to my script and then I get the credentials using a library to interface with the API for AWS (boto3 in my case), I log in to the registry and finally push the image. The goal is to remove the needs to use AWS API in my script.
Thanks in advance.
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: