Any way to get the URI for a ECR image if it was c...
# general
b
Any way to get the URI for a ECR image if it was created with
awsx.ecs.Image.fromDockerBuild
?
l
Let me see!
So, unless i'm confusing something. Here's what should work.
It's not elegant, but it's worth trying
bbiab
ok. sorry about that
so, you should be able to do something like this:
Copy code
const image = awsx.ecs.Image.fromDockerBuild(...);
const service = new awsx.ecs.FargateService(..., { image: image, ... });
const uri = image.image("", undefined);
that will give you an
Input<string>
which should be hte uri.
👍 1
b
Okay I’ll give it a shot, thanks!
l
it's basically the full image-id. but my undrstanding is that's the ECR uri as well...
b
gotcha, okay
l
or, at least, it will have the uri, along with possibly tag information as well, since it will be the unique image name.
b
Yeah looks like it has the URI and tag together, I’ll have to split it up and turn it into an ARN
l
is that ok?
we can try to expose the ECR if it's really critical
b
It seems a little convoluted to have to access it like that, but I understand the awsx library is supposed to be more opinionated, but some of the other AWSX resources do expose ARNs as an output