Created
December 21, 2021 16:33
-
-
Save weeyin83/7a9a20a5fc7e10e65561b4d5e6ed4019 to your computer and use it in GitHub Desktop.
Bicep template to deploy an Azure App Service Plan and Web App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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