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

curved-pharmacist-41509

05/30/2020, 5:47 AM
Is there any guidance for integrating 'build' tasks into Pulumi. Lets just say extending the S3 static site with the generation step, similar how the docker tasks will build the image for you
w

white-balloon-205

05/30/2020, 2:48 PM
Yeah - the simplest thing which is fairly common is just to shell out to some build task inside an apply. That apply can depend on outputs of some resources, and then the output of the apply can be an input to other resource(s) so that the build task becomes part of the normal dependency graph. The only downside of this is that the build task will run on every update - even if “nothing has changed”. If that is not acceptable for a use case, dynamic providers can be used to customize the “diff” and “update” logic to be smarter about what work to do when there are (or are not) changes to inputs. The Docker build package does the simple thing above today fwiw.
c

curved-pharmacist-41509

06/01/2020, 5:11 AM
Thanks for this, dug into the docker code and found that. Didn't realise that Outputs can wrap promises then it will get resolved nicely.