So hopefully something simple I have missed. I hav...
# azure
c
So hopefully something simple I have missed. I have stack written in typesceipt that contains an archive function app that I deploy. This happily deploys my .net functions. However I am finding the function app does not reflect any code updates unless it is restarted kinda expected I guess. Is there a neat way I could continuosly deploy and trigger the restart from within Pulumi?
c
How are you deploying the function app. The app should automatically restart and pick up changes when a new zip is deployed.
c
This is what I have so far:
Copy code
const app = new azure.appservice.ArchiveFunctionApp("functionApp", {
    resourceGroup,
    name: `${config.appName}back`,
    archive: new pulumi.asset.FileArchive("../CurriculumVitaeApi/src/CurriculumVitaeApi/bin/Release/netcoreapp3.1/publish"),
    appSettings: {
        "runtime": "dotnet",
        "CvApiDataConnectionString": pulumi.interpolate`@Microsoft.KeyVault(SecretUri=${storageSecretUri})`,
        "GetBlobPath": "curriculumvitae/{id}.json",
        "ContainerName": "curriculumvitae"
    },
    identity: {
        type: 'SystemAssigned'
    },
    siteConfig: {
        cors: {
            allowedOrigins: ["<http://localhost:8080>"]
        }
    }
});
I can also see the changes were deployed by Pulumi logs
Copy code
Previewing update (dev):

    pulumi:pulumi:Stack infrastructure-dev running 
    azure:appservice:ArchiveFunctionApp functionApp  
    azure:core:ResourceGroup resourceGroup  
    azure:appservice:Plan functionApp  
    azure:storage:Account functionapp  
    azure:storage:Account cvStorageAccount  
    azure:storage:Container functionapp  
 ++ azure:storage:Blob functionApp create replacement [diff: ~source]
 +- azure:storage:Blob functionApp replace [diff: ~source]
    azure:keyvault:KeyVault cv-kv  
    azure:keyvault:Secret StorageConnectionString  
 ~  azure:appservice:FunctionApp functionApp update [diff: ~appSettings]
 ++ azure:keyvault:AccessPolicy functionAccessPolicy create replacement [diff: ~objectId]
 +- azure:keyvault:AccessPolicy functionAccessPolicy replace [diff: ~objectId]
    azure:keyvault:Secret FunctionsHostKey  
 -- azure:storage:Blob functionApp delete original [diff: ~source]
 -- azure:keyvault:AccessPolicy functionAccessPolicy delete original [diff: ~objectId]
    pulumi:pulumi:Stack infrastructure-dev   
Outputs:

Resources:
    ~ 1 to update
    +-2 to replace
    3 changes. 10 unchanged