Need some help - pretty stuck... How can I referen...
# general
Need some help - pretty stuck... How can I reference a stack when the current stack's passphrase is different than the stack-to-be-referenced's passphrase?
Copy code
var otherStack = new StackReference("other-stack");
This works great for all my lower environments which share a stack passphrase. But my production stack has a different passphrase, for obvious reasons. When it executes that code, pulumi dumps an error because the current PULUMI_CONFIG_PASSPHRASE environment variable is valid for the prod stack but not for "other-stack". FWIW, I'm using the default secrets provider - maybe that's technically "passphrase" since I see there's one called "default" in the docs but I don't know what that means or how it's different than "passphrase". Is this possible? Would appreciate direction. Thanks.
For now I changed the prod stack passphrase to the same as the other stacks. Really not a good solution. So I'd still appreciate any input / feedback / direction on if this is possible and, if so, how. Based on what I'm seeing right now, this seems to be a conflict between what we're able to do with secrets providers (a documented feature) and stack references (also a documented feature). Note that I have already seen these issues: • and • No updates of note in ~3+ years.
Bump. @billowy-army-68599??
This is not supported now as you point out. The secrets provider needs to be able to decrypt the value. If you need to do this, use a cloud secrets provider like a kms key or the Pulumi service
Also: I appreciate you need an answer, but this is a best effort support basis.
Thanks for the reply. It's not clear to me how using a cloud secrets provider fixes the issue. Is that b/c the provider is internally "known" by each stack so when I call "new StackReference" it knows everything required for that referenced stack, separate from the current stack?
I appreciate you need an answer, but this is a best effort support basis.
You're right. I know that. My apologies if I came across as demanding.