-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathweb-app.bicep
48 lines (45 loc) · 1.56 KB
/
web-app.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('Name of the resource.')
param name string
@description('Location to deploy the resource. Defaults to the location of the resource group.')
param location string = resourceGroup().location
@description('Tags for the resource.')
param tags object = {}
@description('ID for the App Service Plan associated with the Web App.')
param appServicePlanId string
@description('Web App Kind. Defaults to app,linux.')
param kind string = 'app,linux'
@description('App settings for the Web App.')
param appSettings array = []
@description('ID for the Managed Identity associated with the Web App.')
param identityId string
@description('Public network access for the Web App. Defaults to Enabled.')
param publicNetworkAccess string = 'Enabled'
resource webApp 'Microsoft.Web/sites@2023-12-01' = {
name: name
location: location
tags: tags
kind: kind
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${identityId}': {}
}
}
properties: {
serverFarmId: appServicePlanId
siteConfig: {
appSettings: appSettings
}
keyVaultReferenceIdentity: identityId
httpsOnly: true
publicNetworkAccess: publicNetworkAccess
}
}
@description('The deployed Web App resource.')
output resource resource = webApp
@description('ID for the deployed Web App resource.')
output id string = webApp.id
@description('Name for the deployed Web App resource.')
output name string = webApp.name
@description('Host for the deployed Web App resource.')
output host string = webApp.properties.defaultHostName