https://pulumi.com logo
Title
c

colossal-room-15708

04/04/2020, 3:55 AM
Anybody got an example of a Linux / python FunctionApp? This here replaces the function app every single time a
pulumi up
is done because the
osType
has changed post deployment.
const appservicePlan = new azure.appservice.Plan("asp", {
    resourceGroupName: resourceGroup.name,
    kind: "functionapp",
    sku: { tier: "Dynamic", size: "Y1" },
    reserved: true
});

const app = new azure.appservice.ArchiveFunctionApp("app", {
    resourceGroupName: resourceGroup.name,
    name: functionAppName,
    plan: appservicePlan,
    version: "~3",
    httpsOnly: true,
    identity: {
        type: "SystemAssigned"
    },
    archive: new pulumi.asset.FileArchive("./app"),
    appSettings: {
        "FUNCTIONS_WORKER_RUNTIME": "python"
    },
    siteConfig: {
      linuxFxVersion: "python|3.7",
      minTlsVersion: "1.2"
    }
});
No matter what I set any of the
kind
or other settings to, it always recreates the function app
pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:incidentdev::azure::pulumi:pulumi:Stack::azure]
        +-azure:appservice/functionApp:FunctionApp: (replace)
            [id=/subscriptions/<subId>/resourceGroups/xirus/providers/Microsoft.Web/sites/xirus]
            [urn=urn:pulumi:incidentdev::azure-incidents::azure:appservice:ArchiveFunctionApp$azure:appservice/functionApp:FunctionApp::app]
            [provider=urn:pulumi:incidentdev::azure::pulumi:providers:azure::default_2_1_0::04544b37-b741-4473-bfed-ec6ab72507f3]
          - osType: "linux"
Seems like
osType
is not exposed in
azure.appservice.ArchiveFunctionApp
@tall-librarian-49374 any idea here?
t

tall-librarian-49374

04/04/2020, 6:57 AM
I should finally have time to look at https://github.com/pulumi/examples/issues/610 on Monday
c

colossal-room-15708

04/06/2020, 12:19 PM
Awesome, that one and the subnet bug will unblock a lot of my work. 👍
t

tall-librarian-49374

04/06/2020, 12:52 PM
c

colossal-room-15708

04/06/2020, 1:00 PM
Perfect, will test as soon as it's merged! Any idea about the subnet bug?
t

tall-librarian-49374

04/06/2020, 1:01 PM
not yet
c

colossal-room-15708

04/06/2020, 1:05 PM
I feel like TF is abandoning the nested subnet property on the vnet resource (so many properties that one doesn't support, like private endpoints). Not being able to use the standalone resource now is suboptimal. Let me know if I can help or test anything.