// main.bicep param functionAppName string param location string param runtime string param storageAccountName string param storageAccountSku string resource appServicePlan 'Microsoft.Web/serverFarms@2020-12-01' = { name: '${functionAppName}-asp' location: location kind: 'FunctionApp' properties: { name: '${functionAppName}-asp' reserved: true targetWorkerSizeId: 0 targetWorkerCount: 0 } } resource storageAccount 'Microsoft.Storage/storageAccounts@2021-02-01' = { name: storageAccountName location: location sku: { name: storageAccountSku } kind: 'StorageV2' properties: { allowBlobPublicAccess: false minimumTlsVersion: 'TLS1_2' } } resource functionApp 'Microsoft.Web/sites@2020-12-01' = { name: functionAppName location: location kind: 'FunctionApp' properties: { serverFarmId: appServicePlan.id siteConfig: { appSettings: [ { name: 'AzureWebJobsStorage' value: 'DefaultEndpointsProtocol=https;AccountName=${storageAccount.name};AccountKey=${listKeys(storageAccount.id, storageAccount.apiVersion).keys[0].value};EndpointSuffix=core.windows.net' } { name: 'FUNCTIONS_WORKER_RUNTIME' value: runtime } ] } } } output endpoint string = functionApp.properties.defaultHostName