Hello, we’re using Pulumi CLI + self-hosted state ...
# general
c
Hello, we’re using Pulumi CLI + self-hosted state (i.e. we are not self-hosting the platform components). Are stack references possible, in this case? It seems that the concept of “organization” doesn’t map onto this scenario, is that correct? Thanks.
l
Hello @calm-cat-43230, the current implementation of cloud storage backends doesn't support the organization name. However, we are working on that. You can read the proposal here: https://github.com/pulumi/pulumi/issues/2522#issuecomment-1426496284 Let us know if you have additional thoughts or remarks on this.
c
Thanks @limited-rainbow-51650 for the quick reply. When you say “doesn’t support the organization name”, does that mean stack references are supported using some (perhaps undocumented) naming convention? Or that stack references are simply not supported? It’s a little unclear to me from the documentation (which seems to imply you need an “organization” for any stack references).
l
Stack references are supported, but on cloud storage, all your stacks are usually in a flat namespace, typically all side by side. The stack name usually needs to contain the project name in it to work properly (old implementation). It is also much harder on cloud storage backends to have granular access control to stack state. The proposal above should allow for more structure in this setup.
c
That’s fair, thanks — what is the naming convention? Can you point to some documentation (or code) that shows this? We’re using S3 as our cloud storage, and all projects that need to share state use the same base key prefix
/
, so would we simply use
project/stack
?
(Update here: from reading around in github issues it appears the “flat namespace” is simply all stacks in the same backend — so if we use the stack name (no project prefix) that appears like it should work.) Thanks again.