hi, is "pulumi config" ablet to handle nested keys...
# general
c
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
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
ok, thanks
w
It’s common to use JSON values and then
config.getObject
from code to parse the raw JSON string into value.
c
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
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
good to know, thanks