UPD: SOLVED. Hey everyone! I am trying to develo...
# getting-started
a
UPD: SOLVED. Hey everyone! I am trying to develop several projects using local login (
file://~
), both having the same sets of stacks (like
dev
). But when doing
pulumi stack init dev
at the second project. Pulumi tells me that stack
dev
already exists. My structure is like depicted here (as in docs).
l
a
Thank you! Meanwhile, I've found a workaround. The following seems to isolate projects for me:
PULUMI_BACKEND_URL=file:///tmp/1 pulumi stack ls
PULUMI_BACKEND_URL=file:///tmp/2 pulumi stack ls
b
@able-ability-11203 you’re better off prefixing your stacks with the project name
pulumi stack init <http://myApp.dev|myApp.dev>
pulumi stakc init <http://infrastructure.dev|infrastructure.dev>
m
Different backends (e.g. azure blob) will have issues with duplicate named stacks as they can be stored in a "flat" structure. I've employed a naming convention for "stack" names of
<project>.<stack>
so
<http://infrastructure.dev|infrastructure.dev>
,
infrastructure.prod
would be what I would use. Although you could isolate projects to different backends, if you'd like to consume stack outputs from one stack in another, you'll need to use the same backend for both.
a
Thank you! Could I probably suffix them as well
Copy code
dev.infra
<http://dev.app|dev.app>
prod.infra
<http://prod.app|prod.app>
? To quickly tell envs from one another.
b
as long as they’re unique you can name them how you like 🙂
a
Sounds good, thanks for prompt reply!