Hi, I'm using `LocalWorkspace.CreateOrSelectStackA...
# automation-api
Hi, I'm using
which works great. But is there a way to remove a stack (not destroy) using pulumi.automation? Right now I have to do it using the CLI pulumi stack rm
Found it you have to instantiate a Workspace by passing it the same working directory then call
Copy code
LocalWorkspace aPulumiWorkspace = await LocalWorkspace.CreateAsync(new LocalWorkspaceOptions() { WorkDir = path });

var StackArgs = new LocalProgramArgs("StackName", path);
            this.Stack = await LocalWorkspace.CreateOrSelectStackAsync(StackArgs);

aPulumiWorkspace .RemoveStackAsync("StackName")
This looks like something I’ll need pretty soon. Thanks for sharing!