Hi There, I’m learning Pulumi. I wrote a sample co...
# azure
a
Hi There, I’m learning Pulumi. I wrote a sample code that creates an #azure web app in #dotnet(C#). I need to access the web app instance I created in my code inside of an ‘if’ statement so that I can add AppSettings based on a given condition. Anyone can help me with that or point me to a code sample? I’m using the Azure-Native library. I guess it starts somehow like this:
webapp.SiteConfig.Apply(cfg => cfg.AppSettings.Add(?????));
Thanks !
t
You can add app settings with a separate resource https://github.com/pulumi/pulumi-azure-native/blob/master/examples/appservice/index.ts#L105 You’d need to build the collection first (possibly inside an apply) and then pass it to that resource. May I ask why your logic needs to be based on the outputs of the web app that you created?