-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-plan.bicep
50 lines (41 loc) · 1.03 KB
/
app-plan.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@allowed(['dev', 'stage', 'test', 'prod'])
@description('Specifies the environment to provision resources')
param env string = 'dev'
param location string = resourceGroup().location // Location for all resources
param webAppName string = uniqueString(resourceGroup().id)
param sku string = 'B1'
var appServicePlanName = toLower('AppServicePlan-${webAppName}')
var webSiteName = toLower('wapp-${webAppName}')
resource appServicePlan 'Microsoft.Web/serverfarms@2020-06-01' = {
name: appServicePlanName
location: location
properties: {
reserved: true
}
sku: {
name: sku
}
kind: 'linux'
tags:{
purpose: 'education'
environment: env
}
}
resource appService 'Microsoft.Web/sites@2020-06-01' = {
name: webSiteName
location: location
identity:{
type: 'SystemAssigned'
}
properties: {
serverFarmId: appServicePlan.id
siteConfig: {
linuxFxVersion: 'DOTNETCORE|7.0'
}
}
tags:{
purpose: 'education'
environment: env
}
}
output PrincipalId string = appService.identity.principalId