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

fancy-shoe-29676

12/14/2020, 7:55 PM
Hm, i renamed the stack and it worked for the first time - a second run fails again with the PASSPHRASE requirement
l

lemon-agent-27707

12/14/2020, 11:31 PM
The passphrase provider is enough to create the stack, but this will modify the stack settings (pulumi.stack.yaml) to include
encryptedKey
and/or
encryptedSalt
depending on which secrets provider you specify. When you run your code again, those values are missing and you get the error message.
You'll need to update your code to specify the additional values for stacks that already exist. There are a few ways to do this, probably the easiest is to use a fixed working directory
workDir: "."
or something equivalent and to not specify the
stackSettings
object manually. This way when you create a stack, the
pulumi.stack.yaml
file gets created in a consistent directory. Next time you run your program and select the stack, it will read settings from that directory.
f

fancy-shoe-29676

12/15/2020, 4:53 AM
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
l

lemon-agent-27707

12/15/2020, 6:02 AM
Are you creating new stacks or selecting stacks in CI? If the latter, you will need to figure out how to specify that full info including salt and key either via a file or stack settings.
f

fancy-shoe-29676

12/15/2020, 6:13 AM
i used the
createOrSelectStack
method and thought its just selecting when its already created and available in my state bucket … but looks like not working. atm i dont manage secrets in pulumi so i can also use a static password for the passphrase - but its an “ugly” workarround
l

lemon-agent-27707

12/15/2020, 5:42 PM
For existing stacks that use alternate secrets you'll need to make one of the changes noted above. Either specifying they key/salt in the stackSettings, or saving the pulumi.stack.yaml and making sure it's available in CI and specified via the correct working dir.
2 Views