pulumi-command
pulumi-command copied to clipboard
Document functionality of triggers property on Command resource
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
The triggers
property on local.Command
does not have descriptive text in the docs or in the SDK so it's not clear what is the expected behavior of this property.
Affected area/feature
This is available now:

This isn't that helpful. what is the type expected?
I put a FileArchive and got a unrecognized signature '' in property map for "triggers"
back. @lukehoban
I used the triggers
parameter like shown below. When the modification time for some_file
changes, it triggers a replacement.
import os
copy_file = pulumi_command.remote.CopyFile(
"copy_file",
connection=connection,
local_path="some_file",
remote_path="/home/user/some_file",
triggers=[
os.path.getmtime("some_file")
]
)
Maybe it would make sense to write something like:
Changes to any of these values, trigger replacements
as well as the types supported :) afaik it is only simple types (maybe only strings?)
I was struggling with this as well. Re-opening to improve the docs.
@thomas11 , @C0DK , is the triggers
a state/flag variable, which if changes (current-run value is different for previous-runs), the underlying action gets executed?
@thomas11 , @C0DK , is the
triggers
a state/flag variable, which if changes (current-run value is different for previous-runs), the underlying action gets executed?
Yes, exactly. It's simply an opaque value of type any/object that's checked for equality with the previous value.