Hello everyone again; another question, unfortunat...
# automation-api
b
Hello everyone again; another question, unfortunately. Is there a way to configure the LocalWorkspace indicating where to save the pulumi state folder of automated stacks? Imagine the case I have the Automation API behind an HTTP server (like the example provided by Pulumi) running in Kubernetes, I don’t want the pulumi state folder to reside in the POD running the HTTP server (because it is stateless); I want to use an external folder where I can store and rework the stacks for subsequent actions.
b
I would instead configure your automation API use to provide a directory to local workspace instead of allowing automation api to create one. If automation api creates the directory, than it will also try to clean it up after - which will defeat the purpose of controlling that location per your use case.
b
Good point, thanks. The question is, what’s the setting to configure to make the LocalWorkspace work with such a folder?
b
When you instantiate a local workspace it should take in some arguments, one of which is a working directory
b
Ok.. so the working directory is the folder that will create the pulumi state folder? Am I assuming correctly? Thanks a lot
b
Ohhhh no. The working directory is the folder where the project file and the stack settings files are. The directory where the state files are is called the “backend.” There is an environment variable you can set to control that, or it is a value in the project settings.
I’m sorry I missed where you said state in your original question.
b
no worries, thanks anyway for your help