best-hospital-12760
05/19/2020, 11:01 AMpulumi.yaml
and pulumi-stackname.yaml
.
starting a thread so I don't turn general into pastebin 😄name: my-example-stack
runtime: go
template:
config:
my-example-stack:my-variable:
description: Input variable in the stack namespace defined for all stacks
default: HELLO-WORLD-IN-ALL-STACKS
• Or, are you supposed to only do it via individual stacks?
Pulumi.development.yaml
name: my-example-stack
runtime: go
template:
config:
my-example-stack:my-variable:
description: Input variable in the stack namespace defined for all stacks
default: HELLO-WORLD-IN-ONLY-THE-DEVELOPMENT-STACK
• Or is there another way I can achieve global defaults and allow individuals to override settings before deploying their owns stacks?future-barista-68134
05/19/2020, 1:35 PMimport * as pulumi from "@pulumi/pulumi";
const config = new pulumi.Config();
// Use null-coalescing operator to set default values
const exampleValue = config.get("example-key") ?? "default-value";
export const configValue = exampleValue;
best-hospital-12760
05/19/2020, 11:01 PM