programmatically in typescript how to handle this.
# getting-started
n
programmatically in typescript how to handle this.
b
When you say "programatically", do you mean from within a Pulumi program or you want to write a script/app that will just go and clear locks?
n
within pulumi programe
At run time, before I start an operation on a stack, can I clean up locks if present on that particular stack via pulumi cancel in my code and then let stack.up be called ?
b
If you're using our Automation api then yes before you run
stack.up()
you can cancel, but be aware that this may leave the stack in an inconsistent state if a resource operation was pending when the update was canceled.