``` const projectName = "project" const ar...
# automation-api
f
Copy code
const projectName = "project"

    const args: InlineProgramArgs = {
        stackName: "dev",
        projectName: projectName,
        program: pulumiProgram
    };

    const projectSetting: ProjectSettings = {
        name: projectName,
        runtime: "nodejs",
        backend: {
            url: "<s3://pulumi-states>"
        }
    }

    const stackSettings: StackSettings = {
        secretsProvider: "<awskms://alias/pulumi?region=eu-central-1>"
    }

    const opts: LocalWorkspaceOptions = {
        projectSettings:  projectSetting,
        stackSettings: {
            "dev": stackSettings
        },
        secretsProvider: "<awskms://alias/pulumi?region=eu-central-1>"
    }

    // create (or select if one already exists) a stack that uses our inline program
    const stack = await LocalWorkspace.createOrSelectStack(args, opts);
f
I had to add
workDir: "."
to my
mLocalWorkspaceOptions
value to get some stuff working - maybe that will fix your problem:
Copy code
const opts: LocalWorkspaceOptions = {
        projectSettings:  projectSetting,
        stackSettings: {
            "dev": stackSettings
        },
        workDir: ".",
        secretsProvider: "<awskms://alias/pulumi?region=eu-central-1>"
    }
just a guess ....
f
hi, thx, it solves the problem on my local machine - but in the ci pipeline it happens again because the working directory is empty every time
f
Maybe refresh config if the stack exists? Just guessing and not quite sure how to do that 😉