best-xylophone-83824
08/19/2019, 11:32 AMpulumi.Config().getObject<T>()
? I get
error: getting secrets manager: could not unmarshal map: yaml: unmarshal errors:
line 4: cannot unmarshal !!map into string
all the time 😞
Config is valid YAML:
config:
gcp-gke:region: europe-west2
gcp-gke:nodePools:
ingress:
roles: ["ingress"]
nodeConfig:
machineType: "g1-small"
preemptible: true
Code:
type NodePoolConfig = Omit<
gcp.container.NodePoolArgs,
"cluster" | "location" | "name"
> & { roles: string[] };
const nodepools = new pulumi.Config().getObject<{
[name: string]: NodePoolConfig;
}>("nodePools");
white-balloon-205
getObject
function deserializes a JSON string into an object.
See also https://github.com/pulumi/pulumi/issues/2307#issuecomment-480449982 and specifically https://github.com/pulumi/pulumi/issues/2306.best-xylophone-83824
08/19/2019, 1:58 PM