https://pulumi.com logo
#general
Title
# general
p

prehistoric-ram-58389

06/29/2022, 1:54 PM
Hi all, I am using Pulumi with S3 backend. When I create a stack “dev” in my project, I can see the stack logged in S3, but it only says “dev” without belonging to any project. Is there a way to have a higher division, such as “project/stack”, so that I can have many projects, each with a “dev” and “prod” stacks?
b

billowy-army-68599

06/29/2022, 2:41 PM
the S3/filestate backends don't support projects or organisations. you need to call your stack
{project/name}
for example `pulumi stack init vpc.dev
p

prehistoric-ram-58389

06/29/2022, 2:42 PM
And can I extract the “dev” part out of it?
Or do I have to get that manually with “getStack()“?
b

billowy-army-68599

06/29/2022, 4:13 PM
getStack()
wil return the full stack name, eg
<http://vpc.dev|vpc.dev>
- you can split that using whatever string split mechanism you want
p

prehistoric-ram-58389

06/29/2022, 5:58 PM
Got it, thank you!
4 Views