-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebapp2.bicep
56 lines (45 loc) · 1.5 KB
/
webapp2.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
@description('Application Name')
@maxLength(30)
param applicationName string = 'to-do-app${uniqueString(resourceGroup().id)}'
@description('Location for all resources.')
param location string = resourceGroup().location
@description('App Service Plan\'s pricing tier. Details at https://azure.microsoft.com/en-us/pricing/details/app-service/')
param appServicePlanTier string = 'P1V2'
@minValue(1)
@maxValue(3)
@description('App Service Plan\'s instance count')
param appServicePlanInstances int = 1
@description('The URL for the GitHub repository that contains the project to deploy.')
param repositoryUrl string = 'https://github.com/lucasbench/Azure-BootUp'
@description('The branch of the GitHub repository to use.')
param branch string = 'main'
var websiteName = applicationName
var appServicePlanName = applicationName
resource appServicePlan 'Microsoft.Web/serverfarms@2021-01-01' = {
name: appServicePlanName
location: location
sku: {
name: appServicePlanTier
capacity: appServicePlanInstances
}
kind: 'linux'
}
resource appService 'Microsoft.Web/sites@2021-01-01' = {
name: websiteName
location: location
properties: {
serverFarmId: appServicePlan.id
httpsOnly: true
siteConfig: {
http20Enabled: true
}
}
}
resource srcControls 'Microsoft.Web/sites/sourcecontrols@2021-01-01' = {
name: '${appService.name}/web'
properties: {
repoUrl: repositoryUrl
branch: branch
isManualIntegration: true
}
}