https://pulumi.com logo
c

colossal-room-15708

03/21/2019, 5:10 AM
What do people generally do to work around this issue here: https://github.com/pulumi/pulumi/issues/2306 I'm currently working on a thing where I actually need quite a few lists in my config (or where resources even require lists as input) and this issue is a bit annoying.
w

white-balloon-205

03/21/2019, 5:26 AM
You can use
config.getObject
to parse the string value of the config as JSON. Then you can set config to the valid JSON string input you want. Alternatively, I’ve seen many folks just encode lists comma separated and then
val.split(‘,’)
to get the array of values.
c

colossal-room-15708

03/21/2019, 5:28 AM
I guess that's clever enough for the time being. Cheers
p

proud-artist-4864

03/21/2019, 5:49 AM
yaml is an awful text protocol because it’s so easy to screw up. And then you end up with stupid stuff like templated yaml.
Personally, I’d add a custom config of my own and not try to extend Pulumi’s
I like the idea of making config actually a resource, means that the dependencies get to be part of the graph.