https://pulumi.com logo
a

able-beard-29160

05/23/2020, 6:04 PM
Does
pulumi.StackReference
work with anything else other than the Pulumi service? I'm not sure what to pass as a stack name to the constructor.
I'm using the local login and as far as I glean from the source code, it seems that I should be able to pass just the stack name, without the
$organization/$project
part. That means all stacks names share a single namespace and I'll have to implement my own namespacing convention using something other than
/
, e.g.,
.
.
Yup, it worked just fine like I said.
💯 1
m

millions-furniture-75402

05/26/2020, 4:29 PM
Can you elaborate on implementing your own namespacing convention?
$organization/$project
don’t facilitate any separation in shared state / stack references, so you’ll have to do
$organization/$project/$environment.$stack
so you can reference the stack by
${environment}.${stack}
?
I found a blog post that uses your suggested solution when managing your own state: https://blog.scottlogic.com/2020/04/21/starting-with-pulumi.html
a

able-beard-29160

05/27/2020, 8:28 PM
Yup, exactly. That's pretty much what I did. That's a good article.
👍 1