Skip to content

Commit

Permalink
Fix telemetry resource
Browse files Browse the repository at this point in the history
  • Loading branch information
oZakari committed Jan 19, 2024
1 parent 96817eb commit 1357cdf
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions avm/res/app/container-app/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var builtInRoleNames = {
}

resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' = if (enableTelemetry) {
name: '46d3xbcp.res.app-container-app.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}'
name: '46d3xbcp.res.app-containerapp.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}'
properties: {
mode: 'Incremental'
template: {
Expand Down Expand Up @@ -195,29 +195,29 @@ resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
}

resource containerApp_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
properties: {
storageAccountId: diagnosticSetting.?storageAccountResourceId
workspaceId: diagnosticSetting.?workspaceResourceId
eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
eventHubName: diagnosticSetting.?eventHubName
metrics: diagnosticSetting.?metricCategories ?? [
{
category: 'AllMetrics'
timeGrain: null
enabled: true
}
]
logs: diagnosticSetting.?logCategoriesAndGroups ?? [
{
categoryGroup: 'AllLogs'
enabled: true
}
]
marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
}
scope: containerApp
name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
properties: {
storageAccountId: diagnosticSetting.?storageAccountResourceId
workspaceId: diagnosticSetting.?workspaceResourceId
eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
eventHubName: diagnosticSetting.?eventHubName
metrics: diagnosticSetting.?metricCategories ?? [
{
category: 'AllMetrics'
timeGrain: null
enabled: true
}
]
logs: diagnosticSetting.?logCategoriesAndGroups ?? [
{
categoryGroup: 'AllLogs'
enabled: true
}
]
marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
}
scope: containerApp
}]

resource containerApp_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
Expand Down

0 comments on commit 1357cdf

Please sign in to comment.