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

cold-coat-35200

11/06/2018, 7:57 AM
hi, is "pulumi config" ablet to handle nested keys, like
foo:bar:hello: "world"
? as far as I see it can't, only simple keys, like
foo:bar: "world"
c

creamy-potato-29402

11/06/2018, 8:08 AM
config data is unstructured text.
foo:bar:hello
is the key here.
oh wait, no, I might be lying to you.
anyway, I don’t think we do support nested keys, no
c

cold-coat-35200

11/06/2018, 8:43 AM
ok, thanks
w

white-balloon-205

11/06/2018, 4:17 PM
It’s common to use JSON values and then
config.getObject
from code to parse the raw JSON string into value.
c

cold-coat-35200

11/06/2018, 4:24 PM
that's still not ideal, out of curiosity, why pulumi using this simple configuration instead of some more robust, like yaml(especially because config values saved in a yaml)?
w

white-balloon-205

11/06/2018, 4:30 PM
Definitely agreed that it's not ideal. The original motivation was that this was designed to be CLI-driven:
pulumi config set key value
. It makes sense to think about values as strings in this context. But over time this ended up getting stored in a
Pulumi.stack.yaml
that looks (and is!) very hand-editable - and in fact, it's often easier to just author config directly in the file than using the CLI. Once this is in YAML/JSON, it's of course silly to be treating values as strings. We've been wanting to revisit this as part of a larger re-design of config - there's some thinking on this in https://github.com/pulumi/pulumi/issues/1052.
c

cold-coat-35200

11/06/2018, 4:51 PM
good to know, thanks