This message was deleted.
# getting-started
s
This message was deleted.
e
Worth raising an issue at https://github.com/pulumi/pulumi-azure-native/issues for that if pre 3.51 reliably works and 3.51 doesn't.
r
Thanks Fraser - I managed to work through this issue although now presented with the image atttached. It appears the function app keys are not automatically generated in Azure DevOps. My code to instantiate a function app is as follows:
Copy code
public class FunctionApp
    {
        public Output<string> FunctionAppName { get; }
        public Output<string> FunctionAppKey { get; }
        public Output<string> FunctionEndpoint { get; }

        public FunctionApp(Config config, SharedResources shared)
        {
            var functionAppName = $"fn-aggregator-{config.Env}";
            var functionApp = new WebApp("aggregatorFunctionApp", new WebAppArgs
            {
                ResourceGroupName = shared.ResourceGroup.Name,
                Name = functionAppName,
                ServerFarmId = shared.AppServicePlan.Id,
                Kind = "functionapp",
                Identity = new ManagedServiceIdentityArgs { Type = ManagedServiceIdentityType.SystemAssigned },
                SiteConfig = new SiteConfigArgs
                {
                    AppSettings =
                    {
                        new NameValuePairArgs {Name = "AzureWebJobsStorage", Value = shared.StorageConnectionString},
                        //new NameValuePairArgs
                        //    {Name = "AzureWebJobsServiceBus", Value = queues.ServiceBusConnectionString},
                        new NameValuePairArgs
                              {Name = "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", Value = shared.StorageConnectionString},
                        new NameValuePairArgs {Name = "WEBSITE_CONTENTSHARE", Value = functionAppName},
                        new NameValuePairArgs {Name = "FUNCTIONS_EXTENSION_VERSION", Value = "~4"},
                        new NameValuePairArgs {Name = "FUNCTIONS_WORKER_RUNTIME", Value = "dotnet"},
                        new NameValuePairArgs {Name = "WEBSITE_RUN_FROM_PACKAGE", Value = "1"},
                        //new NameValuePairArgs
                        //    {Name = "APPINSIGHTS_INSTRUMENTATIONKEY", Value = shared.Insights.InstrumentationKey},
                        new NameValuePairArgs {Name = "LendSandboxApiKey", Value = config.LendSandboxApiKey},
                        new NameValuePairArgs {Name = "GetFullLead", Value = config.GetFullLead},
                        new NameValuePairArgs {Name = "CORECLR_ENABLE_PROFILING", Value = "1"},
                        new NameValuePairArgs {Name = "CORECLR_PORFILER", Value = config.CORECLR_PORFILER},
                        new NameValuePairArgs {Name = "CORECLR_PROFILER_PATH", Value = config.CORECLR_PROFILER_PATH},
                        new NameValuePairArgs {Name = "DD_ENV", Value = config.DatadogEnvironment},
                        new NameValuePairArgs {Name = "DD_SERVICE", Value = config.DatadogIntegrationServiceName},
                        new NameValuePairArgs {Name = "DD_VERSION", Value = config.DatadogIntegrationServiceVersion},
                        new NameValuePairArgs {Name = "DD_DOTNET_TRACER_HOME", Value = config.DD_DOTNET_TRACER_HOME},
                        new NameValuePairArgs {Name = "DD_API_KEY", Value = config.DatadogApiKey},
                        new NameValuePairArgs {Name = "DD_SITE", Value = config.DD_SITE},
                        new NameValuePairArgs {Name = "DD_LOGS_INJECTION", Value = "true"},
                        //new NameValuePairArgs {Name = "DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS", Value = "ILogger"},
                        new NameValuePairArgs {Name = "logging:logLevel:Microsoft.Azure.WebJobs.Script.WebHost.Middleware.SystemTraceMiddleware", Value = "None"},
                    },
                    AlwaysOn = true
                },
                Tags = config.DefaultTags,
            });

            FunctionAppName = functionApp.Name;
            
            FunctionAppKey = Output.Tuple(functionApp.Name, shared.ResourceGroup.Name, Output.CreateSecret(""), functionApp.Id).Apply(
                t => ListWebAppHostKeys.InvokeAsync(new ListWebAppHostKeysArgs
                {
                    Name = t.Item1,
                    ResourceGroupName = t.Item2,
                })).Apply(result => result.MasterKey);

            FunctionEndpoint = Output.Format($"https://{functionApp.DefaultHostName}/api");
        }
    }