https://pulumi.com logo
Title
g

green-daybreak-91402

01/18/2023, 8:06 PM
hello, How could one use Pulumi to check if an ECR image should be build again? we are building images using the
awsx.classic.ecr.buildAndPushImage
function
l

little-cartoon-10569

01/18/2023, 8:31 PM
Afaik you cannot. Mixins like this do all their work in the constructor, and it's non-optional. The only solution to this that I've found is to remove the image building logic from the main Pulumi app. You can have one small Pulumi app that runs
up
if (and only if) the image needs to change. And the main Pulumi app uses whatever image is currently pushed.
This fits the build-once-deploy-many-times mantra, too. A single app managing both the build and deploy cycles is prone to problems.
g

green-daybreak-91402

01/18/2023, 8:38 PM
gotcha, thanks!
b

bumpy-grass-54508

01/19/2023, 3:12 PM
they are working on a new major version: https://github.com/pulumi/pulumi-docker/issues/436 that should be more like a normal resource and detect changes to the docker build context etc
g

green-daybreak-91402

01/19/2023, 5:11 PM
awesome! Excited for that update!