-
Notifications
You must be signed in to change notification settings - Fork 5
/
dotnetApp.bicep
77 lines (65 loc) · 2.03 KB
/
dotnetApp.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
// References:
// https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.web/web-app-loganalytics/main.bicep
// Kudu: https://docs.microsoft.com/en-us/azure/app-service/resources-kudu
@description('Name that will be used to build associated artifacts')
param appName string = 'OOA-${uniqueString(resourceGroup().id)}'
@description('Location for all resources.')
param location string = resourceGroup().location
@description('Which Pricing tier our App Service Plan to')
param skuName string = 'S1'
@description('How many instances of our app service will be scaled out to')
param skuCapacity int = 1
@description('The URL for the GitHub repository that contains the project to deploy.')
param repoURL string = 'https://github.com/MSUSSolutionAccelerators/Overdose-Prevention-Solution-Accelerator.git'
@description('The branch of the GitHub repository to use.')
param branch string = 'main'
var appServicePlanName = 'asp-${appName}'
var webSiteName = toLower('wapp-${appName}')
resource appServicePlan 'Microsoft.Web/serverfarms@2020-12-01' = {
name: appServicePlanName
location: location
sku: {
name: skuName
capacity: skuCapacity
}
tags: {
displayName: 'HostingPlan'
ProjectName: appName
}
}
resource appService 'Microsoft.Web/sites@2020-12-01' = {
name: webSiteName
location: location
identity: {
type: 'SystemAssigned'
}
tags: {
displayName: 'Website'
ProjectName: appName
}
properties: {
serverFarmId: appServicePlan.id
}
}
resource appSource 'Microsoft.Web/sites/sourcecontrols@2020-12-01' = {
parent: appService
name: 'web'
location: location
properties: {
repoUrl: repoURL
branch: branch
isManualIntegration: true
}
dependsOn: [
appServiceConfig
]
}
resource appServiceConfig 'Microsoft.Web/sites/config@2021-03-01' = {
parent: appService
name: 'appsettings'
properties: {
PROJECT: 'Overdose-Accelerator-Web\\OverdoseAcceleratorWeb.csproj'
clientUrl: 'http://${appName}.azurewebsites.net'
netFrameworkVersion: 'v6.0'
}
}