So.. in the process of correcting an omission of m...
# azure
So.. in the process of correcting an omission of mine (leaving PublicIpName out of the config, thus ending up with a random suffix i didn't want in the publicip name) - I noted that it's really hard to change the publicip of an ApplicationGateway:
Copy code
+-  ├─ azure-native:network:PublicIPAddress     <id>appgw-publicIp                   replaced                [diff: ~publicIpAddressName]
 ~   └─ azure-native:network:ApplicationGateway  <id>appgw                            **updating failed**     [diff: ]; 1 error

  pulumi:pulumi:Stack (baseline-infra-dev.infra.infratesting):
    error: update failed

  azure-native:network:ApplicationGateway (n10272appgw):
    error: Code="ApplicationGatewayFrontendIpPublicIpAddressCannotBeChanged" Message="PublicIPAddress property of FrontendIpConfiguration /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/applicationGateways/<id>appgw/frontendIPConfigurations/appGwPublicFrontendIp cannot be changed." Details=[]
And of course any following operation is to try to delete the IP that is still connected to the AppGW that I cannot disconnect because it "cannot be changed":
Copy code
Updating (dev.infra.infratesting):
     Type                                     Name                                   Status                  Info
     pulumi:pulumi:Stack                      baseline-infra-dev.infra.infratesting  **failed**              1 error
 -   └─ azure-native:network:PublicIPAddress  <id>appgw-publicIp                   **deleting failed**     1 error

  azure-native:network:PublicIPAddress (<id>appgw-publicIp):
    error: Code="PublicIPAddressCannotBeDeleted" Message="Public IP address /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/publicIPAddresses/<id>appgw-publicIpb861f3ce can not be deleted since it is still allocated to resource /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/applicationGateways/<id>appgw/frontendIPConfigurations/appGwPublicFrontendIp. In order to delete the public IP, disassociate/detach the Public IP address from the resource.  To learn how to do this, see <|>." Details=[]
I might be presuming too much - especially considering the intricacies involved in all this - but pulumi would have to be aware of all the different edge cases of all the different kinds of operations on all the different resources to be able to handle this stuff. Is it at all to be expected that pulumi would ever be able to predictably handle these kinds of changes when the underlying provider is so fundamentally blind to how things should work?
if it makes anyone feel any better - when I select both the public ip + the appgw in the azure portal to manually delete the damned things, azure itself spews an error saying it can't delete the IP address because it's connected to the appgw (which it eventually deleted by the way).
So what would be the ideal behavior here from the Pulumi side?
FWIW, i recall solving delete order issues by specifying