Created
December 1, 2022 14:47
-
-
Save weeyin83/9c39dd36b709478fe7991cb35d48d5ce to your computer and use it in GitHub Desktop.
Azure Bicep template for deploying a web app and app service plan
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 // App Service Plan pricing tier | |
param linuxFxVersion string = 'node|18-lts' // The runtime stack of web app | |
param location string // Resource Azure region location | |
param resourceTags object = { | |
Environment: 'Tutorial' | |
Owner: 'Sarah' | |
} // Tags for all resources | |
param appServicePlanName string // Name of the App Service Plan | |
param webSiteName string // Name of the Web App being deployed | |
// Deploying the Azure App Service Plan | |
resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-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@2022-03-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