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

handsome-truck-95168

12/17/2019, 8:00 PM
Is there any documentation I can read about
default
values in the
Pulumi.yaml
? They seem to be not working but I imagine I'm doing it wrong.
Specifically, I set
default
values for some of my configuration variables, but when I deploy a stack my script complains that those configuration values with defaults are missing.
w

white-balloon-205

12/17/2019, 8:04 PM
Do you mean the
template:
section as below?
Copy code
name: aws-go-s3-folder
runtime: go
description: A static website hosted on AWS S3
template:
  config:
    aws:region:
      description: The AWS region to deploy into
      default: us-west-2
That is only used by templates currently (
pulumi new
), it is not project level configuration. We are considering proving a way to provide declarative project config (see for example https://github.com/pulumi/pulumi/issues/1052#issuecomment-374255486). But today, project level config defaults should be added to the code with something like
config.get("something") || "defaultValue"
.
h

handsome-truck-95168

12/17/2019, 8:04 PM
ohhh got it
w

white-balloon-205

12/17/2019, 8:04 PM
That said - it looks like the
template
section is missing from the docs at https://www.pulumi.com/docs/intro/concepts/project/ and should be added there.
h

handsome-truck-95168

12/17/2019, 8:05 PM
I expected them to work when I ran
pulumi up
with a new stack
Now i understand, thank you.
4 Views