This is mostly my fault, but it seems worth mentio...
# azure
l
This is mostly my fault, but it seems worth mentioning - at a minimum to set my expectations, and it could be a bug. I created an Azure WebApp that was intended to be an Azure Function. I did the pulumi up, and from pulumi's POV, everything looked right. However, in the Azure portal, it just showed as a regular "app service". Checking my code, I see that I forgot to set the "Kind" property to "FunctionApp" (sort of a big deal - I know). So I added the property, and pulumi preview said it would update based on that property change. However, when I ran "pulumi up," though it thinks it succeeded, the portal still shows it as an "app service." And the template shows that the value of "kind" is "app." FYI.
m
That does sound like a bug. Would you be able to file it with a small code sample?
l
Here's the "pulumi up" output. Notice that it expects to update based on
+kind
- that property added to the app service.
I post that extra detail to double check... You're saying that azure+pulumi should be able to change the type of an app service from "app" to "functionapp" -OR- that pulumi should be smart enough to realize that the thing it created can't be "updated in place," so it needs to delete that one and create a new one? I just want to verify that before looking at creating a bug. If the answer is "Yes, that should work," then if you can point me to the right place to create a bug, I can do that. It won't be a full working example - I don't have time for that. But I can post the source file and point out the 1 line change which I made that caused the observed behavior. Thanks.
m
I don’t know off-hand if in-place changes of the “kind” are possible in Azure apps, but either way, Pulumi should either successfully update in-place, or replace the app service. In any case, whatever the preview says should then actually happen. For the bug, it’s https://github.com/pulumi/pulumi-azure-native/issues if you use the native provider or https://github.com/pulumi/pulumi-azure/issues if you use the classic/bridged provider. Thank you!
l