did anybody managed to use `pulumi.Config().getObj...
# general
b
did anybody managed to use
pulumi.Config().getObject<T>()
? I get
Copy code
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:
Copy code
config:
  gcp-gke:region: europe-west2
  gcp-gke:nodePools:
    ingress:
      roles: ["ingress"]
      nodeConfig:
        machineType: "g1-small"
        preemptible: true
Code:
Copy code
type NodePoolConfig = Omit<
    gcp.container.NodePoolArgs,
    "cluster" | "location" | "name"
> & { roles: string[] };

const nodepools = new pulumi.Config().getObject<{
    [name: string]: NodePoolConfig;
}>("nodePools");
w
Pulumi config currently only supports string values. The
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.
b
thanks for links! closed 2 issues I opened today 🙂