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

limited-rain-96205

05/12/2021, 7:55 PM
Is it expected that
LocalWorkspace.selectStack()
would delete the
encryptedkey:
section of the stack's yaml file?
Found the issue. If you pass the secrets provider in the LocalWorkspaceOptions parameter, it does in fact delete the encryption key (??).
r

red-match-15116

05/12/2021, 8:03 PM
You’ll need to provide it in both the workspace options and stack settings
l

limited-rain-96205

05/12/2021, 9:05 PM
@red-match-15116 Er, sorry if I was unclear. What I'm saying is that if you call
LocalWorkspace.selectStack()
and pass in the secrets provider at all, it will remove the existing encryption key from the stack file.
I resolved the issue by only passing in the secrets provider when doing
LocalWorkspace.createStack()
, and not passing it when doing
LocalWorkspace.selectStack()
.
However because of this, it looks like secrets encryption is broken if you try to use
LocalWorkspace.createOrSelectStack()
r

red-match-15116

05/12/2021, 10:46 PM
Ah, got it. That is certainly non-ideal. Could you please open an issue?
3 Views