Hi,raised the question earlier but didnt get the r...
# general
l
Hi,raised the question earlier but didnt get the reply, we have api which create project and stack and creates the pulumi project folder on the specified location using automation api . however when we try to deploy any service ie ec2,s3 on specific project/stack it gives error,
unable to find the stack
. Just would like to confirm if we are using the right function to select the existing stack .Below is the the code , workDir is the absolute path there the project directory is created . We have tried giving different ways with no luck
Copy code
workDir := "./projects"	fmt.Println("workDir",workDir)

s, err := auto.SelectStackInlineSource(ctx, projvls.Stackname, projvls.Projectname , program,  auto.PulumiHome(workDir), envvars)	if err != nil {
we have also tried to use following function as well but unable to locate the stack
Copy code
// WorkDir is the directory to execute commands from and store state.
func WorkDir(workDir string) LocalWorkspaceOption {
	return localWorkspaceOption(func(lo *localWorkspaceOptions) {
		lo.WorkDir = workDir
	})
}
b
How are you setting the Pulumi backend?
c
For backend we have tried with both local and our own s3 bucket. Backend is also set using autimation api at the time of project creation
b
Yes, are you setting it with an environment variable? Or in project settings? Can you show full code?