https://pulumi.com logo
b

boundless-monkey-50243

09/04/2018, 7:33 PM
So I'm afraid I know the answer to this, but...it looks like configuration data in Pulumi is just a string:string mapping?
m

microscopic-florist-22719

09/04/2018, 7:33 PM
That is essentially correct. It's currently up to the language to interpret the config values.
b

boundless-monkey-50243

09/04/2018, 7:33 PM
Nngh. That's really, really unfortunate
m

microscopic-florist-22719

09/04/2018, 7:34 PM
I think we have an issue somewhere tracking improving this. Looking...
b

boundless-monkey-50243

09/04/2018, 7:34 PM
(current context: "I have a list of CIDR blocks I need passed to a security group")
m

microscopic-florist-22719

09/04/2018, 7:35 PM
https://github.com/pulumi/pulumi/issues/1052 is the issue, though it sort of only hints at the problem.
b

boundless-monkey-50243

09/04/2018, 7:35 PM
Yeah, TBH this is the first part of Pulumi that I think I have to completely go around
m

microscopic-florist-22719

09/04/2018, 7:35 PM
The current approach is to represent richer values as JSON and use
config.requireObject<>
or
config.getObject<>
Yeah, the config system as it stands could use some work šŸ™‚
If you have ideas here we'd love to hear them.
b

boundless-monkey-50243

09/04/2018, 7:36 PM
I have ideas, but they fundamentally disrespect the multi-platform thing you're going for.
I'm probably just going to do the same thing I do for every other JS app:
require()
a file and throw if its export is not of type
MyStackConfig
.
m

microscopic-florist-22719

09/04/2018, 7:38 PM
šŸ‘
b

boundless-monkey-50243

09/04/2018, 7:38 PM
(When I say "JS" I really mean "TypeScript", and then I already have a self-describing config without having to have one reinvented)
Though, tangentially, the multi-language thing is the thing about Pulumi that worries me the most. Lowest common denominators and all
r

rough-oil-1458

09/04/2018, 8:51 PM
but... that was so easy to go around... that i'd call that a feature
s

stocky-spoon-28903

09/04/2018, 9:14 PM
I think Iā€™d agree with @rough-oil-1458 there.
b

boundless-monkey-50243

09/04/2018, 9:48 PM
I wouldn't, because now I'm not doing something standard.
Which means I have to document it and have to maintain it.
Users will read Pulumi's docs and have to remember (incurring additional cognitive load) that "we do something different here"
r

rough-oil-1458

09/05/2018, 1:04 PM
Library vs Framework šŸ™‚