https://pulumi.com logo
#general
Title
# general
g

great-sunset-355

08/01/2022, 9:33 AM
Is it possible to tell pulumi to perform all
destroy
actions before everything else?
l

limited-rainbow-51650

08/01/2022, 9:37 AM
Pulumi builds a directed acyclic graph of all operations it has to execute and tries to run as much as possible concurrently. Only when there are dependencies between resources, will there be an sequencing of these actions. Can you elaborate a bit why you want
destroy
actions to run first?
f

fancy-spoon-7206

08/01/2022, 1:26 PM
I am assuming you mean destroy and recreate all the time? If that is it, a simple bash script with pulumi CLI commands can do the trick.
g

great-sunset-355

08/02/2022, 4:24 AM
I have Gitlab resources that I have named
user-role
and when role changes I wanted do discard that resource but due to concurrency it was not rly possible, but in the end, I went with a different naming scheme so I should not need it. One option I can think of is to use automation API and pick only destroy urns from
preview
and leave the rest for the 2nd
up
l

limited-rainbow-51650

08/02/2022, 5:47 AM
@damp-spoon-83471 which resource type from the Gitlab provider are you using for
user-role
If possible, can you share a snippet of the code? I think you don’t have an Output dependency between some of the resources, which leads to Pulumi doing everything concurrently.
g

great-sunset-355

08/04/2022, 10:55 AM
Hi @limited-rainbow-51650 correct there is no dependency, so to runs concurrently. On top of that I found an issue in terraform gitlab provider, which completely breaks what intended to do 😞 https://github.com/gitlabhq/terraform-provider-gitlab/issues/1194
3 Views