little-kangaroo-50941
04/27/2020, 3:30 PMcolossal-room-15708
04/27/2020, 9:54 PMlittle-kangaroo-50941
04/28/2020, 9:43 AMcolossal-room-15708
04/28/2020, 11:20 AMconst app = new azure.appservice.ArchiveFunctionApp("app", {
resourceGroupName: resourceGroup.name,
name: functionAppName,
plan: appservicePlan,
version: "~3",
httpsOnly: true,
osType: "linux",
identity: {
type: "SystemAssigned"
},
archive: new pulumi.asset.FileArchive("./app"),
appSettings: {
"FUNCTIONS_WORKER_RUNTIME": "python",
},
siteConfig: {
linuxFxVersion: "python|3.7",
minTlsVersion: "1.2",
}
});
const functionPrincipalId = app.functionApp.identity.apply(principal => principal.principalId || "11111111-1111-1111-1111-111111111111");
new azure.role.Assignment("appowner", {
scope: azure.core.getSubscription().id,
principalId: functionPrincipalId,
roleDefinitionName: "Contributor"
});
little-kangaroo-50941
04/28/2020, 3:47 PMvar func = new FunctionApp(funcName, new FunctionAppArgs
{
Name = funcName,
ResourceGroupName = resourceGroup.Name,
AppServicePlanId = appServicePlan.Id,
HttpsOnly = true,
AppSettings =
{
{"runtime", "dotnet"},
{"WEBSITE_RUN_FROM_PACKAGE", codeBlobUrl},
{"AzureWebJobsStorage", storageAccount.PrimaryConnectionString },
{"MicrosoftAppId", botAdApp.ApplicationId},
{"MicrosoftAppPassword", botAdAppSecret.Value}
},
StorageAccountName = storageAccount.Name,
StorageAccountAccessKey = storageAccount.PrimaryAccessKey,
Version = "~3",
Identity = new FunctionAppIdentityArgs
{
//PrincipalId = funcAdApp.ApplicationId,
//TenantId = azureConfig.Require("tenantId"),
Type = "SystemAssigned"
},
SiteConfig = new FunctionAppSiteConfigArgs
{
Use32BitWorkerProcess = false
}
});