sparse-intern-71089
12/17/2020, 1:52 AMclever-sunset-76585
12/17/2020, 2:10 AMdependsOn. (EDIT: assuming basic1 changes somehow in order to trigger a change on its dependents.)
The other way, if you are interested (and slightly complicated), is to pass some input, that changes based on basic1 changing, to basic2 that you can then use in the diff function of basic2 to compare and see if the value has changed. I forget the order of the DynamicResource interface functions being called but you might find https://www.pulumi.com/blog/dynamic-providers/ helpful.green-country-86774
12/17/2020, 2:18 AMcheck method is called every time but there doesn't seem to be any reference to the depend. I must be missing something small.green-country-86774
12/17/2020, 2:22 AMpulumi up. Then, update the value in basic1 to value2 and have that trigger the diff method of the basic2 resources on the next pulumi up.green-country-86774
12/17/2020, 2:22 AMgreen-country-86774
12/17/2020, 2:27 AMrequiresRestart property that I could use as an input to the other resource.clever-sunset-76585
12/17/2020, 5:55 PMIt looks like theYeahmethod is called every time but there doesn’t seem to be any reference to the dependcheck
check is used to validate inputs and return errors if needed to stop execution. You can read more about the various interface functions here, in case you haven’t come across this doc already: https://www.pulumi.com/docs/intro/concepts/programming-model/#check-olds-news
diff is where you can return an object that indicates whether a replacement/update is required based on some input changing.
t sounds like the simplest solution would be what you suggested and output something like aWhile using a boolean might work the first time (going fromproperty that I could use as an input to the other resource.requiresRestart
false -> true, it can only have one of two states. You could use some string output from basic1 that changes over time based on something else, which in turn could be used within the diff function to compare old inputs with new inputs and therefore perform an update/replacement.clever-sunset-76585
12/17/2020, 5:56 PMdiff function determines which function the engine will call next. That is, if it should call the delete , update or create function of your dynamic provider.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by