https://pulumi.com logo
b

busy-umbrella-36067

10/03/2018, 9:53 PM
is there a simpler way than this to build and push a docker image to ECR? https://github.com/pulumi/pulumi-docker/blob/master/docker/tests/image/index.ts#L25-L39
w

white-balloon-205

10/03/2018, 10:57 PM
Which part of this were you hoping to be simpler? The first statement is required to create an ECR repository to use. The second statement is required to get credentials for accessing it from AWS (given that these are short lived and not directly available from the repository). The third statement captures which folder to build and what name to tag and push it with. In something like
cloud.Service
we hide all of those steps inside
new cloud.Service("s", { build: "./app" })
, but all of those steps still have to happen.
b

busy-umbrella-36067

10/03/2018, 11:32 PM
Why does the
getCredentials
function need a registry id? I'm running into dependency issues on previews since the repo doesn't exist yet
w

white-balloon-205

10/03/2018, 11:33 PM
I think the short lived credentials are specific to a registry. This ultimately boils down to https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login.html.
b

busy-umbrella-36067

10/03/2018, 11:35 PM
Registry IDs are optional, it should be possible to get a global login for a specific region
w

white-balloon-205

10/03/2018, 11:57 PM
Ahh - indeed that is right - we can likely relax this in the
getCredentials
API then. Want to open an issue in https://github.com/pulumi/pulumi-docker?
b

busy-umbrella-36067

10/04/2018, 1:28 PM
I can do that, did you mean open an issue under https://github.com/pulumi/pulumi-aws instead?
w

white-balloon-205

10/04/2018, 2:21 PM
Yeah - that works - thanks!