Maybe someone can help me out here. I’m kinda stuc...
# dotnet
p
Maybe someone can help me out here. I’m kinda stuck on trying to figure out how to do what I want to do. So I want to make a network class with subnets and then new an instance of that class with details from the pulumi config file. I want to do this so the logic is reusable and we don’t have write the same code twice. I thought I could potentially get away with this by using some access modifiers however that won’t work. Any hints in the right direction would help 😇
t
Your plan sounds reasonable. I can’t grasp the problem that you are facing yet… Here is one example of a reusable component, if that helps https://github.com/pulumi/examples/blob/master/azure-cs-net5-aks-webapp/AksCluster.cs
p
Thanks Mikhail, Ill take a look!
Also, just to share what I have so far. Here is what I currently have.
t
Reading from config like this seems reasonable. If you want, you may have some helper class/methods with parameters for vnets/subnets/… and pass the configured values to it from the Stack class.
p
Thanks! Got it working 🙂