-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azuredeploy.bicep
48 lines (42 loc) · 1.21 KB
/
azuredeploy.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
@description('The name of the function app that you wish to create.')
@maxLength(14)
param appNamePrefix string
@description('The location of the function app that you wish to create.')
param location string = resourceGroup().location
@description('The SKU of App Service Plan.')
@allowed([
'F1'
'B1'
'S1'
'P0v3'
'P1v3'
])
param sku string
var webAppName = 'app-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}'
var appServicePlanName = 'plan-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}'
resource appServicePlan 'Microsoft.Web/serverfarms@2022-09-01' = {
name: appServicePlanName
location: location
sku: {
name: sku
}
}
resource webApp 'Microsoft.Web/sites@2022-09-01' = {
name: webAppName
location: location
properties: {
clientAffinityEnabled: false
httpsOnly: true
serverFarmId: appServicePlan.id
siteConfig: {
netFrameworkVersion: 'v8.0'
ftpsState: 'Disabled'
minTlsVersion: '1.2'
scmMinTlsVersion: '1.2'
}
}
}
resource webAppName_AppServiceProxy_SiteExtension 'Microsoft.Web/sites/siteextensions@2022-09-01' = {
parent: webApp
name: 'AppServiceProxy.SiteExtension'
}