mammoth-night-22453
05/27/2020, 8:14 PMconfig:
proj:data:
nonProductionStart: 10.1.0.0
productionStart: 10.2.0.0
stacks:
- name: Sandbox
peerConnectionName: peerConnectionId
stackName: org/Sandbox/mono
I can indeed follow the docs and get a JsonElement first, then get the sub-element as a string using something like
var data = Configuration.GetObject<JsonElement>("data");
var stacksAsString = data.GetProperty("stacks");
But what I really am trying to do is something like:
var stacks = Configuration.GetObject<List<StackReferenceInfo>>("data.stacks");
But, this does not appear to work. Is there no way to achieve this without jumping through the JsonElement hoop?
I have reviewed https://www.pulumi.com/docs/intro/concepts/config/#structured-configuration and it shows the JsonElement method - perhaps that's the only way?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by