https://pulumi.com logo
Title
m

most-mouse-38002

10/17/2022, 2:34 PM
Are stacks global? I can’t have
dev
or
staging
in multiple projects? If I try, I am told that stack already exists.
f

fast-river-57630

10/17/2022, 2:38 PM
What's your backend? On the hosted one each isolated "project" could have its own "dev". I had issues doing the same with the S3 backend.
m

most-mouse-38002

10/17/2022, 2:46 PM
I guess right now, local, but I assume the same problem will occur on Azure blobs (which is kinda S3), unless we create different blobs for each project.
f

fast-river-57630

10/17/2022, 2:56 PM
yeah I'm not a pro but it was finicky for me. i ended up just using different stack names like 'project-$name' then splitting out $name when i needed it. even with 'dev' on multiple projects the stack itself isn't shared, just the name. if you want project data from one 'dev' to go to another 'dev' you need to use an output and a StackReference. https://www.pulumi.com/registry/packages/aws/how-to-guides/aws-ts-stackreference/
(I assumed you were just interested in sharing the name between multiple projects but maybe you wanted to share stack data too?)
m

most-mouse-38002

10/18/2022, 2:08 PM
yeah, i wanted both, thanks for the tip (and sorry for late response) 👍