rich-tent-99497
06/28/2024, 6:13 AMimport * as pulumi from "@pulumi/pulumi";
import * as azureNative from "@pulumi/azure-native";
// Replace with your function app details
const resourceGroupName = "myResourceGroup";
const functionAppName = "myFunctionApp";
// Get the default function app key
const functionAppKeys = pulumi.output(azureNative.web.listWebAppFunctionKeys({
resourceGroupName: resourceGroupName,
name: functionAppName,
functionName: "default",
}));
// Export the default function app key
export const defaultFunctionAppKey = functionAppKeys.apply(keys => keys.default);
But there is no default property. The properties on keys are (id, kind, name, properties, type). I’ve looked at the raw out via az functionapp keys list and I receive a JSON object:
{
"functionKeys": {
"default": "BlahBlahw=="
},
"masterKey": "MoreBlahBlah==",
"systemKeys": {}
}
I’m not sure how to obtain the functionKeys.default value if infact, thats what the functionAppKeys
result contains