Skip to content

Commit 770385a

Browse files
Update log analytics workspace ID handling and standardize naming conventions in virtual network module
1 parent 818fbf6 commit 770385a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

infra/main.bicep

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ module virtualNetwork './modules/virtualNetwork.bicep' = if (enablePrivateNetwor
150150
addressPrefixes: ['10.0.0.0/20']
151151
location: resourceGroupLocation
152152
tags: tags
153-
logAnalyticsWorkspaceId: existingLogAnalyticsWorkspaceId
153+
logAnalyticsWorkspaceId: enableMonitoring ? logAnalyticsWorkspace!.outputs.resourceId : ''
154154
resourceSuffix: solutionSuffix
155155
enableTelemetry: enableTelemetry
156156
}
@@ -168,7 +168,7 @@ module bastionHost 'br/public:avm/res/network/bastion-host:0.6.1' = if (enablePr
168168
diagnosticSettings: [
169169
{
170170
name: 'bastionDiagnostics'
171-
workspaceResourceId: existingLogAnalyticsWorkspaceId
171+
workspaceResourceId: enableMonitoring ? logAnalyticsWorkspace!.outputs.resourceId : ''
172172
logCategoriesAndGroups: [
173173
{
174174
categoryGroup: 'allLogs'
@@ -223,7 +223,7 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable
223223
diagnosticSettings: [
224224
{
225225
name: 'jumpboxDiagnostics'
226-
workspaceResourceId: existingLogAnalyticsWorkspaceId
226+
workspaceResourceId: enableMonitoring ? logAnalyticsWorkspace!.outputs.resourceId : ''
227227
logCategoriesAndGroups: [
228228
{
229229
categoryGroup: 'allLogs'
@@ -346,7 +346,6 @@ module avmManagedIdentity './modules/managed-identity.bicep' = {
346346
}
347347

348348
// ========== Key Vault Module ========== //
349-
350349
module avmKeyVault './modules/key-vault.bicep' = {
351350
name: take('module.key-vault.${solutionSuffix}', 64)
352351
params: {

infra/modules/virtualNetwork.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ param addressPrefixes array
1313
@description('An array of subnets to be created within the virtual network. Each subnet can have its own configuration and associated Network Security Group (NSG).')
1414
param subnets subnetType[] = [
1515
{
16-
name: 'Containers'
16+
name: 'containers'
1717
addressPrefixes: ['10.0.2.0/24'] // /24 (10.0.2.0 - 10.0.2.255), 256 addresses
1818
delegation: 'Microsoft.App/environments'
1919
networkSecurityGroup: {
20-
name: 'nsg-Containers'
20+
name: 'nsg-containers'
2121
securityRules: [
2222
//Inbound Rules
2323
{

0 commit comments

Comments
 (0)