https://pulumi.com logo
Title
b

billions-judge-9412

01/26/2022, 7:39 PM
Hello! We're currently in the process of evaluating Pulumi to see if it fits our use case and came upon an issue and i can't find anything in the documentation on this. Basically, we have a resource (On azure, if that matters) that we're trying to update. However this update requires the resource to be recreated. The output says to destroy the component first. But just like how you would 'Taint' something in terraform - Is there an equivelant in Pulumi? TL;DR - Is there any way to force 'pulumi up' to recreate/destroy a specific resource? - Similiar to Terraforms taint function
d

delightful-gigabyte-39334

01/26/2022, 7:44 PM
There are resourceoptions you can define with the resource to control things like that where the provider may not already do. https://www.pulumi.com/docs/intro/concepts/resources/options/ the two that are probably notable for this one is replaceOnChanges and deleteBeforeReplace
there is also a
--target-replace
option on pulumi up. i dont know if that would do exactly what your looking for.
b

billions-judge-9412

01/26/2022, 7:50 PM
Hmm. What if i change something on it, that doesn't require the resource to be recreated - Wouldn't it than also be recreated each time? I'd only want this to happen, specifically when theres a change that requires it, if you know what i mean Regarding --target-replace. This might be what i'm looking for, although i'd prefer to be able to manually "taint" something before, and then let a pipeline of some sort handle the actual pulumi up run. I'll take in any ideas!
d

delightful-gigabyte-39334

01/26/2022, 7:51 PM
You can specify which option within the resource will trigger the replacement, so you can define it to only replace if foo changes, but update if bar changes.
b

billions-judge-9412

01/26/2022, 7:52 PM
This might be the solution then. I appreciate the help!