Skip to content

Instantly share code, notes, and snippets.

@weeyin83
Created December 21, 2021 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weeyin83/7a9a20a5fc7e10e65561b4d5e6ed4019 to your computer and use it in GitHub Desktop.
Save weeyin83/7a9a20a5fc7e10e65561b4d5e6ed4019 to your computer and use it in GitHub Desktop.
Bicep template to deploy an Azure App Service Plan and Web App
param sku string
param linuxFxVersion string = 'node|14-lts' // The runtime stack of web app
param location string
param resourceTags object = {
Environment: 'Tutorial'
Owner: 'Me'
} // Tags for all resources
param appServicePlanName string
param webSiteName string
// Deploying the Azure App Service Plan
resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
name: appServicePlanName
location: location
tags: resourceTags
properties: {
reserved: true
}
sku: {
name: sku
}
kind: 'linux'
}
// Deploying the Azure Web App
resource appService 'Microsoft.Web/sites@2021-02-01' = {
name: webSiteName
location: location
tags: resourceTags
properties: {
serverFarmId: appServicePlan.id
siteConfig: {
linuxFxVersion: linuxFxVersion
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment