Is it expected that `LocalWorkspace.selectStack()`...
# automation-api
l
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
You’ll need to provide it in both the workspace options and stack settings
l
@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
Ah, got it. That is certainly non-ideal. Could you please open an issue?