full-artist-27215
01/07/2022, 4:49 PMpulumi config set --path "obj.one" 1
and pulumi config set --path "obj.two" 2
, I'd like to do something similar to pulumi config set obj '{"one": 1, "two: 2}'
. However, that ends up setting obj
to a string, rather than an object.
There doesn't appear to be any kind of --object
option to config set
that might achieve this.
This is made a bit more confusing by the fact that the output of pulumi config
shows actual object values and JSON string values in the same way, while their representation in the raw YAML file is different.
Is there any way to achieve this, short of manually iterating through the object structure and adding each leaf value individually?billowy-army-68599
pulumi config set-all
command?full-artist-27215
01/07/2022, 4:55 PMjq
to parse out what I need to pass to `pulumi`:
jq '. as $in
| reduce leaf_paths as $path (
{};
. + { ($path | map(tostring) | join(".")): $in | getpath($path) }
)
billowy-army-68599
full-artist-27215
01/07/2022, 5:06 PM