https://pulumi.com logo
#general
Title
# general
i

incalculable-portugal-13011

10/15/2019, 7:27 PM
perusing the documentation and I can’t for the life of me figure out how to create an ECS fargate task with a container image hosted on ECR
a

acceptable-army-69872

10/15/2019, 7:30 PM
Umm....I think i did that....hang on lemme dig up my test code.
i

incalculable-portugal-13011

10/15/2019, 7:31 PM
my issue is the
aws.ecr.getImage
fn doesn’t seem to be spitting back the relevant image data in a way that
awsx.ecs.FargateTaskDefinition
can consume as an image
would love to see how you worked it out if you can dig it up!
a

acceptable-army-69872

10/15/2019, 7:35 PM
My memory is that this ran, but I mean, it's an older branch.... let me try to bring it up again, I don't want to lie to you, but i essentially did awsx for the image, and then had to set up the service with aws (which was a bigger pain).
so define vpc, define ecs cluster, define task, define service, define NLB.
Looking at the apis more, awsx.image.fromFile returns an Image, getImage returns GetImageResult, you mike have to massage the info from GetImageResult into an image object.
i

incalculable-portugal-13011

10/15/2019, 7:53 PM
yep. that’s pretty much where I’m stuck
can’t figure out how to massage that image result into something acceptable to
Image.fromPath
3 Views