https://pulumi.com logo
#automation-api
Title
# automation-api
a

adventurous-angle-51130

09/22/2021, 12:01 PM
Hi guys, is there any way to delete a stack itself via automation API? Something equivalent to
pulumi stack rm
?
m

millions-furniture-75402

09/22/2021, 12:59 PM
Here's what I do:
Copy code
public destroyStack = async (stackName: string): Promise<any> => {
    const stack = await this.selectStack(stackName);
    const response = await stack.destroy({ onOutput: <http://console.info|console.info> });
    await stack.workspace.removeStack(stack.name);
    return response;
  }
a

adventurous-angle-51130

09/23/2021, 3:09 PM
Thank you!, it works 👌
🙌 1
👍 1
c

creamy-nail-67991

10/22/2021, 11:32 AM
Thank you @millions-furniture-75402
👍 1