Are stacks global? I can’t have `dev` or `staging`...
# general
m
Are stacks global? I can’t have
dev
or
staging
in multiple projects? If I try, I am told that stack already exists.
f
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
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
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
yeah, i wanted both, thanks for the tip (and sorry for late response) 👍