Azdevify eshopOnWeb
This commit is contained in:
30
infra/core/host/container-apps-environment.bicep
Normal file
30
infra/core/host/container-apps-environment.bicep
Normal file
@@ -0,0 +1,30 @@
|
||||
param environmentName string
|
||||
param location string = resourceGroup().location
|
||||
|
||||
param containerAppsEnvironmentName string = ''
|
||||
param logAnalyticsWorkspaceName string
|
||||
|
||||
var abbrs = loadJsonContent('../../abbreviations.json')
|
||||
var resourceToken = toLower(uniqueString(subscription().id, environmentName, location))
|
||||
var tags = { 'azd-env-name': environmentName }
|
||||
|
||||
resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2022-03-01' = {
|
||||
name: !empty(containerAppsEnvironmentName) ? containerAppsEnvironmentName : '${abbrs.appManagedEnvironments}${resourceToken}'
|
||||
location: location
|
||||
tags: tags
|
||||
properties: {
|
||||
appLogsConfiguration: {
|
||||
destination: 'log-analytics'
|
||||
logAnalyticsConfiguration: {
|
||||
customerId: logAnalyticsWorkspace.properties.customerId
|
||||
sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' existing = {
|
||||
name: logAnalyticsWorkspaceName
|
||||
}
|
||||
|
||||
output containerAppsEnvironmentName string = containerAppsEnvironment.name
|
||||
Reference in New Issue
Block a user