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

gray-yak-9058

04/25/2020, 3:51 PM
Is it not possible to have multiple projects when using the aws backend? When I try to create a second project with a stack named the same as a stack in my first project, I get an error about the stack already existing.
Nevermind. I figured it out. I just need to run
pulumi login
for each project at the path in the s3 bucket that I want, for example
pulumi login --cloud-url s3://<s3-bucket-name>/the/path/to/the/project/im/working/on
w

white-balloon-205

04/25/2020, 4:57 PM
g

gray-yak-9058

04/25/2020, 5:41 PM
@white-balloon-205 thanks for those links. I think I'm a little confused now. If I log into a different backend (even if it is within the same s3 bucket, just a different folder structure within it) then it doesn't sound like I can do a stack reference to a stack in another project, right? How can I setup the aws backend to have multiple projects with the ability to do stack references across projects?
w

white-balloon-205

04/25/2020, 5:48 PM
I believe you have to log into the same backend across projects, and then use stack names that are unique across all projects - for example following a naming pattern of
<project name>-<stackname>
.
g

gray-yak-9058

04/25/2020, 5:59 PM
Hmm.. I see. I wish it worked a little more like the Pulumi SAAS offering. I can get this to work though. I'm already separating my environments into different git repositories, so I was already going to have 1 stack per pulumi project, so this should be ok to do (1 project, multiple stacks)
w

white-balloon-205

04/25/2020, 6:18 PM
Right - the goal is that those two issues will be addressed so that this is easier.