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

stocky-island-3676

12/18/2019, 12:10 PM
pulumi stack init
: How can we set in which
project
the stack will be created in?
Is seems the project is implicitly set by what’s set in the
name
in the nearest
Pulumi.yaml
.?
g

gentle-diamond-70147

12/18/2019, 2:27 PM
Yep, that’s how it works.
s

stocky-island-3676

12/18/2019, 2:35 PM
That’s not really intuitive, though. The
org/project/stack
semantic is explicit & more obvious. E.g. with
pulumi stack select org/project/stack
.
@gentle-diamond-70147 Am I right that
stack
s are a subpart of a
project
? Or can stacks be in the Pulumi platform without a project?
g

gentle-diamond-70147

12/18/2019, 3:21 PM
A stack is an instantiation of a project (e.g.
dev
,
staging
,
prod
), so a stack always belongs to a project.
s

stocky-island-3676

12/18/2019, 3:33 PM
I see. Thanks for the clarification.
c

colossal-beach-47527

12/18/2019, 5:01 PM
To be frank, this is an area that we are still working to improve the support for across the CLI. (As earlier this year a stack was just identified by
org/stack
, and we later added
org/project/stack
.) So there are a few places where the interpretation of “stack identifier” isn’t quite right. But as you mentioned, if you just use
stackname
the
org
and
project
will be inferred. (By the
Pulumi.yaml
file in the current folder, and who you are logged in as.) Similarly,
org/stack
will infer the
project
.) You can specify the project name when creating a new stack though, e.g.
stack init chrsmith/website-backend/production
. However, you will get an error if the project name (
website-backend
) doesn’t match what is in your Pulumi.yaml file. (Since if we allowed that it would lead to some very bad situations down the line.) So we’re working on making this more seamless, but that’s how it all works. Please don’t hesitate to ask any other questions if things are confusing.
s

stocky-island-3676

03/30/2020, 2:23 PM
@colossal-beach-47527 You mind reviewing my PR #3933? Is there sth. missing?
👀 1
👍🏽 1
Thanks 🙂