Skip to content

Commit

Permalink
Cleaning up changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hundredacres committed Feb 20, 2025
1 parent 9b274c5 commit dfd8905
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 4 additions & 6 deletions avm/res/app/managed-environment/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,10 @@ resource managedEnvironment 'Microsoft.App/managedEnvironments@2024-10-02-previe
}
appLogsConfiguration: {
destination: logsDestination
logAnalyticsConfiguration: !empty(logAnalyticsWorkspaceResourceId)
? {
customerId: logAnalyticsWorkspace.properties.customerId
sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
}
: null
logAnalyticsConfiguration: {
customerId: logAnalyticsWorkspace.properties.customerId
sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
}
}
daprAIConnectionString: daprAIConnectionString
daprAIInstrumentationKey: daprAIInstrumentationKey
Expand Down
7 changes: 5 additions & 2 deletions avm/res/app/managed-environment/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.33.93.31351",
"templateHash": "2010587042531943124"
"templateHash": "16135611596956127909"
},
"name": "App ManagedEnvironments",
"description": "This module deploys an App Managed Environment (also known as a Container App Environment)."
Expand Down Expand Up @@ -465,7 +465,10 @@
},
"appLogsConfiguration": {
"destination": "[parameters('logsDestination')]",
"logAnalyticsConfiguration": "[if(not(empty(parameters('logAnalyticsWorkspaceResourceId'))), createObject('customerId', reference('logAnalyticsWorkspace').customerId, 'sharedKey', listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('logAnalyticsWorkspaceResourceId'), '/')[2], split(parameters('logAnalyticsWorkspaceResourceId'), '/')[4]), 'Microsoft.OperationalInsights/workspaces', last(split(parameters('logAnalyticsWorkspaceResourceId'), '/'))), '2023-09-01').primarySharedKey), null())]"
"logAnalyticsConfiguration": {
"customerId": "[reference('logAnalyticsWorkspace').customerId]",
"sharedKey": "[listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('logAnalyticsWorkspaceResourceId'), '/')[2], split(parameters('logAnalyticsWorkspaceResourceId'), '/')[4]), 'Microsoft.OperationalInsights/workspaces', last(split(parameters('logAnalyticsWorkspaceResourceId'), '/'))), '2023-09-01').primarySharedKey]"
}
},
"daprAIConnectionString": "[parameters('daprAIConnectionString')]",
"daprAIInstrumentationKey": "[parameters('daprAIInstrumentationKey')]",
Expand Down

0 comments on commit dfd8905

Please sign in to comment.