Suppose I want to re-execute a `local.Command` eve...
# general
l
Suppose I want to re-execute a
local.Command
every time a set of files on the local filesystem changes. I think this is the use of the
triggers
argument to
local.Command
, but am wondering what the best thing to pass here is. It is a hash of the files that I construct myself? I was hoping Pulumi would have something here, but the asset and archive classes for instance don't appear to expose any methods or paths in that vein. All suggestions welcome!
e
I’m not sure this works today but I think the engine ought to consider a pulumi.FileArchive as an equatable value. I’d try just passing an archive value to triggers, it might just work, but if it doesn’t do raise an issue about it because it seems a very reasonable behaviour to expect. Pretty sure one of our engineers (@happy-parrot-60128) has looked at this or something very similar before.
l
I'll give it a shot -- thanks!
s
You might want to shell out to Make here because it's really good at tracking file dependencies, and then use the resultant file as an input to your Pulumi resource.
133 Views