-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.bicep
83 lines (79 loc) · 1.68 KB
/
main.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
param location string = resourceGroup().location
param aseName string
@allowed([
'None'
'Publishing'
'Web'
'Web,Publishing'
])
param internalLoadBalancingMode string = 'Web,Publishing'
param dnsSuffix string
param websiteName string
param appServicePlanName string
param numberOfWorkers int = 1
@allowed([
'1'
'2'
'3'
])
param workerPool string = '1'
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2020-06-01' = {
name: 'vnet-01'
location: location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.0.0/16'
]
}
}
}
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2020-06-01' = {
name: '${virtualNetwork.name}/subnet-01'
properties: {
addressPrefix: '10.0.1.0/24'
}
}
resource hostingEnvironment 'Microsoft.Web/hostingEnvironments@2020-06-01' = {
name: aseName
location: location
kind: 'ASEV2'
properties: {
name: aseName
location: location
ipsslAddressCount: 0
internalLoadBalancingMode: internalLoadBalancingMode
dnsSuffix: dnsSuffix
virtualNetwork: {
id: virtualNetwork.id
subnet: subnet.name
}
workerPools: []
}
}
resource serverFarm 'Microsoft.Web/serverfarms@2020-06-01' = {
name: appServicePlanName
location: location
properties: {
hostingEnvironmentProfile: {
id: hostingEnvironment.id
}
}
sku: {
name: 'I${workerPool}'
tier: 'Isolated'
size: 'I${workerPool}'
family: 'I'
capacity: numberOfWorkers
}
}
resource website 'Microsoft.Web/sites@2020-06-01' = {
name: websiteName
location: location
properties: {
serverFarmId: serverFarm.id
hostingEnvironmentProfile: {
id: hostingEnvironment.id
}
}
}