Hi, Can I store objects in pulumi config? For exam...
# getting-started
w
Hi, Can I store objects in pulumi config? For example, I want to do something like: config: repos: name: visibility as I am provisioning github repos.
l
Yes. In this case, you would load repos as an object, and it would contain the various properties. The sections "Strongly Typed Configuration" and "Structured Configuration" have examples: https://www.pulumi.com/docs/concepts/config/
w
yeah i saw this but I want to do the c# equivalent of a strongly typed list. where my list items will contain repo name, visibility, etc.
l
I don't know how it works in C#: in typescript, the object that comes back from
requireObject
can be cast to an interface and it works. Maybe someone in #dotnet has a more specific answer?
w
I guess this is the way: repossname: sss repossvisibility: ssss reposssname: sss reposssvisibility: ssss I'd be keen to know if I can refactor this.