https://pulumi.com logo
Title
p

plain-pillow-11037

06/22/2022, 6:38 PM
Hello! I’m building some integration tests for some resources that are
protected
. For the purposes of testing tear down/resource cleanup I need to
unprotect
the resources before destroying the stack. What’s the best way to do this?
b

billowy-army-68599

06/22/2022, 7:37 PM
you can use
pulumi state unprotect --all
p

plain-pillow-11037

06/22/2022, 7:39 PM
Oh nice idea - Thanks! Do you by chance know if there’s a way to do this via the automation API vs the CLI?
b

billowy-army-68599

06/22/2022, 7:39 PM
we don't have support for it in automation API, but you could
execSync
the CLI in your automation API program
(or whatever language you're using)
p

plain-pillow-11037

06/22/2022, 7:40 PM
That’ll do just fine. Thank again.