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

handsome-xylophone-18806

10/19/2019, 11:48 AM
I follow the official example aws-ts-stackreference (https://github.com/pulumi/examples/tree/master/aws-ts-stackreference) with self-managed backend (locally on filesystem) (https://www.pulumi.com/docs/intro/concepts/state/#self-managed-backend). If I use the default directory
file://~
for all projects and run
pulumi up
for
company
project then
department
project, Pulumi will delete the
company
stack and create stack for
department
. If using Pulumi Backend Service, this statement works:
new pulumi.StackReference('clstokes/aws-ts-stackreference-company/dev')
where
clstokes
in the example is the Pulumi Backend Service username,
aws-ts-stackreference-company
is the project name and
dev
is the current stack. If I set backend url, so each project has a separated
.pulumi
at it's root directory
Copy code
Pulumi.yaml
backend:
  url: file://./
Now, how can I get the stack reference of
company
or
department
in
team
project:
new pulumi.StackReference('???')
?
new pulumi.StackReference('clstokes/aws-ts-stackreference-company/dev')
will produces error:
Copy code
pulumi:pulumi:StackReference (clstokes/aws-ts-stackreference-company/dev):
    error: Preview failed: unknown stack "clstokes/aws-ts-stackreference-company/dev"