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

best-xylophone-83824

08/19/2019, 11:32 AM
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

white-balloon-205

08/19/2019, 1:49 PM
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

best-xylophone-83824

08/19/2019, 1:58 PM
thanks for links! closed 2 issues I opened today 🙂
3 Views