07/31/2021, 4:51 PM
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 !


07/31/2021, 6:33 PM
You can add app settings with a separate resource 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?