https://pulumi.com logo
r

refined-pilot-45584

06/23/2023, 2:24 PM
Hey All, Not sure if there is a better channel for this or not; I am using the
command/local
provider; I am looking for a way to easily (In Go) make the Scripts for Update run every time Pulumi Up is executed even if nothing in the remainder of the IaC/Context has changed. Any ideas on this? I know it’s only in Preview but I wasn’t sure if someone else has already done this; Thanks.
a

acceptable-intern-25844

06/23/2023, 2:32 PM
hey, you can simulate the context change with https://github.com/pulumi/pulumi-random and https://www.pulumi.com/docs/concepts/options/dependson/. The idea is to have a resource that will trigger an update every time and make your command depend on such a resource. I’ve seen an example of this somewhere, but couldn’t find it, so try to research that way
r

refined-pilot-45584

06/23/2023, 2:33 PM
Thats a pretty slick lead .. Thanks!
m

miniature-musician-31262

06/23/2023, 3:52 PM
Have you looked at command.local.Run? I believe this is exactly what it’s meant for: https://www.pulumi.com/registry/packages/command/api-docs/local/run/
(I think I’ve used this for things like running front-end build steps as part of a deployment.)