Hi all, hopefully a real quick question I have suc...
# general
Hi all, hopefully a real quick question I have successfully managed to get my Azure Function App deployed using C# and .net however I am struggling to find an easy way to list the host function keys for downstream process? I am sure I am missing something simple. Thanks 🙂
Copy code
var app = new FunctionApp("app", new FunctionAppArgs
            Name = $"{config.FullName}",
            ResourceGroupName = resourceGroup.Name,
            AppServicePlanId = appServicePlan.Id,
            AppSettings =
                {"runtime", "dotnet"},
                {"WEBSITE_RUN_FROM_PACKAGE", codeBlobUrl},
                {"CvApiDataConnectionString", apiStorageAccount.PrimaryConnectionString},
                {"GetBlobPath", "curriculumvitae/{id}.json"},
                {"ContainerName", "curriculumvitae"}
            StorageConnectionString = functionAppStorageAccount.PrimaryConnectionString,
            Version = "~3"

        this.Endpoint = Output.Format($"https://{app.DefaultHostname}");
I think this should do it
Copy code
export const appHostMasterKey = app.functionApp   .getHostKeys().apply((keys) => keys.masterKey);
That was from an
though, so a
might be slightly different
Sorry for the delay in replying. I am using the .net Pulumi packages and I still cannot find any options similar to above for listing keys. I have rooted around in the source code and still not seeing it. Should I be expecting parity across the languages?
yep, you're right
so an app is just a logical container for functions?
Have to take a step back. What are you trying to accomplish here? What keys and what are they for?
I was aiming to run some quick smoke tests as part CI to verify the deployment of my HTTP triggered functions that expect the key as part of the request. So to do so I require the functions host key. I was hoping I could output it and use as part of the test config. I guess a more correct way of doing it would be to create a key vault and use that as the config source. However that would still need to list out the keys to populate.
I think your individual functions within your app would have host keys
Yeah I understand that but after more rooting in the .net source code it seems the getHostKeys or similar is not there. Probably going to give a rewrite into Typescript a try. Thanks for the pointers.