الملفات
github-actions-demos/dotnet-sample/iac/main.bicep
2025-03-29 15:05:51 -04:00

36 أسطر
901 B
Bicep

param webAppName string = uniqueString(resourceGroup().id) // Generate unique String for web app name
param sku string = 'F1' // The SKU of App Service Plan
param location string = resourceGroup().location // Location for all resources
param linuxFxVersion string = 'DOTNETCORE|8.0' // The runtime stack of web app
var appServicePlanName = toLower('AppServicePlan-gh-demo')
var webSiteName = toLower('wapp-${webAppName}')
resource appServicePlan 'Microsoft.Web/serverfarms@2020-06-01' = {
name: appServicePlanName
location: location
sku: {
name: sku
}
kind: 'linux'
properties: {
reserved: true
}
}
resource appService 'Microsoft.Web/sites@2020-06-01' = {
name: webSiteName
location: location
kind: 'app'
properties: {
serverFarmId: appServicePlan.id
siteConfig: {
linuxFxVersion: linuxFxVersion
}
}
}
output webAppName string = appService.name