https://pulumi.com logo
#aws
Title
# aws
s

salmon-thailand-93496

09/02/2023, 4:43 AM
Hello. I’m trying to implement an ECS Task Definition that loads up an image that I’m pushing to ECR, but either the documentation is outdated, or my versions are not latest (I think they are), or I’m missing something. It should be simple:
Copy code
const service = new awsx.ecs.FargateService("service", {
    ...
    taskDefinitionArgs: {
        container: {
            image: image.imageUri,
            ...
        },
    },
});
but the
image
is supposed to come from this:
Copy code
const image = new awsx.ecr.Image("image", {
    repositoryUrl: repository.url,
    path: "./app",
});
But Typescript shows me that there is no such property as
imageUri
on the
Image
type:
Copy code
Property 'imageUri' does not exist on type 'Image'.
This is the documentation: https://www.pulumi.com/docs/clouds/aws/guides/ecs/. What am I missing?
Interesting. So I did two things which seemed like they fixed it: 1. Instead of
image.imageUri
, I changed it to
image.imageName
- but that wasn’t sufficient. It just took too long and the call failed because of a 20 minute timeout (
timeout while waiting for state to become 'tfSTABLE' (last state: 'tfPENDING', timeout: 20m0s)
) 2. I also had to run it one time with the following environmental variable:
PULUMI_DEBUG_PROMISE_LEAKS=true
and then it ran to completion 🤔
l

little-cartoon-10569

09/03/2023, 7:59 PM
Yes, imageName is the correct property of Image to use for that property. The other part is interesting. At a guess, I'd say you could have achieved the same thing by deleting the earlier version of the task definition via the ECS console. It looks like it was related to something being out of sync in AWS.
36 Views