Greetings, I've created a project yaml that contai...
# getting-started
Greetings, I've created a project yaml that contains a template for configuration defaults. However when I run
pulumi stack init
it doesn't use the defaults. I would have hoped that it would ask me about each config in the template and hitting enter uses the default. How does one configure a new stack interactively?
Seems like this template section of the Pulumi.yaml is just for pulumi new, but creates a new project as well.
There's a --generate-only option, but it skips the stack not the project 😞
Do you have a link to the docs on the "template for configuration defaults"? Do you mean the
section of Pulumi.yaml?
Copy code
name: base
runtime: nodejs
description: The infrastructure base, includes DB, Service Account, and certificate configuration.
  description: Environment stack for utilize the base infra project.
      description: The GCP Project for this stack.
      default: prime-dev-374422
      description: The GCP region for which to deploy, this get's inherited by stacks further down the tree.
      default: us-east4
      secret: false
oh, the docs, sec
Yea that doc does imply that
is the only way to go, and
isn't really for stacks. Confusing. I think the docs need more examples.
Still, you should be able to get
pulumi new
to create a stack in the current project. Have you used the
Pulumi new always clobbers the existing directory. And --stack just specifies the name for the stack instead of being prompted.
I ended up just creating a dummy stack that has some default config set then using
pulumi stack init --copy-config-from
Not the most elegant solution, but it works.
Good that it works. You should raise an issue about the
project option. It sounds like it needs better docs (like not saying it works with
pulumi new
), and it needs to work with
stack init