hello, How could one use Pulumi to check if an ECR...
# aws
g
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
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
gotcha, thanks!
b
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
awesome! Excited for that update!