Add function for fetching ECR registry credentials that are compatible with pulumi-docker & pulumi-docker-build #5029
Labels
area/patch
An issue describing an existing patch on upstream and the criteria to close it.
impact/usability
Something that impacts users' ability to use the product easily and intuitively
kind/enhancement
Improvements or new features
Using the existing
aws.ecr.getCredentials
returns credentials that cannot directly be used with pulumi-docker or pulumi-docker-build.Right now it returns a base64-encoded authorization token containing the username
AWS
and the password.In order to make use of them, users first need to base64 decode it, split the string apart and then create the authorization data for the docker providers. This is not intuitive or easy to find. I'm not aware of any scenario where a user would want the raw base64 encoded version because all container tools I know expect user/pass as separate arguments.
The current way of using ECR with the pulumi-docker providers looks like this:
If we had a convenience function that directly returns the data in the right format it could be simplified to this:
Additionally, the
registryId
could be made optional because it's the account ID of the ECR repo. If users do not specify aregistryId
we can default it to the current AWS account.NOTE: The existing
aws.ecr.getCredentials
function is implemented as a patch: #4678. When tackling this, we could think about promoting it to a native provider function.The text was updated successfully, but these errors were encountered: