Hello @Nick Anderson - Thanks for reaching out and posting on the MS Q&A!
Function access keys are scoped to all the HTTP functions in your Function App. For creating them via a Bicep, could you try out the following sample and see if this does the trick?
param FunctionAppName string
@secure()
param FunctionAppKey string
var keyName = 'MyAPIName-key'
resource FunctionAppName_default_keyName 'Microsoft.Web/sites/host/functionKeys@2022-03-01' = {
name: '${FunctionAppName}/default/${keyName}'
properties: {
name: keyName
value: FunctionAppKey
}
}
For broader context, please review the answer I posted on the following thread: Creating a funtion app key using bicep
If you encounter any problems, feel free to let me know in the comments section below with the relevant details, and I'd be happy to dig deeper and help you get unblocked.