Does `pulumi.StackReference` work with anything el...
# general
a
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
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
Yup, exactly. That's pretty much what I did. That's a good article.
👍 1