-
Notifications
You must be signed in to change notification settings - Fork 18
/
web.bicep
36 lines (32 loc) · 1.12 KB
/
web.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
param name string
param location string = resourceGroup().location
param tags object = {}
param identityName string
param containerAppsEnvironmentName string
param containerRegistryHostSuffix string
param containerRegistryName string
param serviceName string = 'web'
param exists bool
resource webIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: identityName
location: location
}
module app '../core/host/container-app-upsert.bicep' = {
name: '${serviceName}-container-app'
params: {
name: name
location: location
tags: union(tags, { 'azd-service-name': serviceName })
identityType: 'UserAssigned'
identityName: identityName
exists: exists
containerAppsEnvironmentName: containerAppsEnvironmentName
containerRegistryName: containerRegistryName
containerRegistryHostSuffix: containerRegistryHostSuffix
targetPort: 80
}
}
output SERVICE_WEB_IDENTITY_PRINCIPAL_ID string = webIdentity.properties.principalId
output SERVICE_WEB_NAME string = app.outputs.name
output SERVICE_WEB_URI string = app.outputs.uri
output SERVICE_WEB_IMAGE_NAME string = app.outputs.imageName