05/16/2020, 10:12 AM
Hi. I have creates an Azure App Service using C# and specified the following (abbreviated) args
var webApp = new AppService(name, new AppServiceArgs
    ClientAffinityEnabled = false,
    HttpsOnly = true,
I then wanted to create a deployment slot with the same setting. I was hoping to be able to pass the webApp in and read the settings in its AppServiceArgs and use them to apply to the SlotArgs (to ensure that they ended up identical) e.g.
var webAppSlot = new Slot(name, new SlotArgs
    ClientAffinityEnabled = webApp.ClientAffinityEnabled,
    HttpsOnly = webApp.HttpsOnly,
This seems to work for the ClientAffinityEnabled setting but for the HttpsOnly setting I get an error... Cannot implicitly convert type 'Pulumi.Output<bool?>' to 'Pulumi.Input<bool>' Why are ClientAffinityEnabled and HttpsOnly behaving differently and is there a way to be able to read the HttpsOnly setting from the webApp and apply it to the slot App? Thanks Alan
Looks like this will work
HttpsOnly = webApp.HttpsOnly.Apply(v => v!.Value),
but I'm still not sure why ClientAffinityEnabled and HttpsOnly behave differently?


05/16/2020, 8:39 PM
That’s a very good question. The duality of nullable types in C# (value vs reference) is getting us here. Maybe we could improve this situation with an extra conversion. Do you mind creating a case in ?


05/17/2020, 4:37 PM
Thanks Mikhail here you go...