Untitled
Guest 153 30th May, 2023
// 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
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Untitled
Markup | 19 | 20 hours ago
- Untitled
Markup | 25 | 23 hours ago
- Wanted to see what your conviction is on this theme
Markdown | 14 | 23 hours ago
- Untitled
Markup | 67 | 1 day ago
- mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.onion
Template Toolkit 2 | 26 | 1 day ago
- Untitled
Markup | 72 | 3 days ago
- Untitled
Markup | 79 | 3 days ago