This message was deleted.
# azure
s
This message was deleted.
t
c
Yeah, ideas…
read it
Is there a way of patching a resource?
I’ve see hacks involving flags and running pulumi up twice.. Feels so dirty
Looks like I can patch it using the
az
CLI: az webapp config ssl bind --certificate-thumbprint $thumbprint --ssl-type SNI --name $webapp --resource-group $resourceGroup
m
Can confirm it’s possible to work around the circular dep by using a
Pulumi.Command
immediately after creation of the cert. Note that it also needs a
delete
command, else a destroy can’t tear down the cert.
Copy code
var command = new Command("apply-cert-binding", new CommandArgs
    {
        Create = "az webapp config ssl bind --certificate-thumbprint $THUMBPRINT --ssl-type SNI --name $APP_NAME --resource-group $RESOURCE_GROUP_NAME",
        
        Delete = "az webapp config ssl unbind --certificate-thumbprint $THUMBPRINT --name $APP_NAME --resource-group $RESOURCE_GROUP_NAME",

        Environment =
        {
            { "THUMBPRINT", cert.Thumbprint },
            { "APP_NAME", app.Name },
            { "RESOURCE_GROUP_NAME", resourceGroup.Name }
        }
    }, new CustomResourceOptions
    {
        DependsOn = cert
    });
c
😮 nice!
cc @microscopic-furniture-52860. Seems to work 🙂
🎉 1
thx!