From c8986c60ac3cabf50620303b6dcb1489e1ea4ab3 Mon Sep 17 00:00:00 2001 From: AlexanderSehr Date: Fri, 27 Oct 2023 09:56:02 +0200 Subject: [PATCH] Update to latest --- .../.test/linux/main.test.bicep | 32 ++++++++++++++++--- modules/compute/virtual-machine/main.bicep | 4 +-- .../modules/nested_networkInterface.bicep | 4 +-- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/modules/compute/virtual-machine/.test/linux/main.test.bicep b/modules/compute/virtual-machine/.test/linux/main.test.bicep index e10ff4188d..3e6754e7c2 100644 --- a/modules/compute/virtual-machine/.test/linux/main.test.bicep +++ b/modules/compute/virtual-machine/.test/linux/main.test.bicep @@ -163,10 +163,34 @@ module testDeployment '../../main.bicep' = { ] enableAutomaticUpdates: true patchMode: 'AutomaticByPlatform' - diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId - diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + nicDiagnosticSettings: [ + { + name: 'customSetting' + metricCategories: [ + { + category: 'AllMetrics' + } + ] + eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId + workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + } + ] + publicIpDiagnosticSettings: [ + { + name: 'customSetting' + metricCategories: [ + { + category: 'AllMetrics' + } + ] + eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId + workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + } + ] disablePasswordAuthentication: true encryptionAtHost: false extensionCustomScriptConfig: { diff --git a/modules/compute/virtual-machine/main.bicep b/modules/compute/virtual-machine/main.bicep index 8931e1681e..92137f4093 100644 --- a/modules/compute/virtual-machine/main.bicep +++ b/modules/compute/virtual-machine/main.bicep @@ -190,7 +190,7 @@ param extensionCustomScriptProtectedSetting object = {} param location string = resourceGroup().location @description('Optional. The diagnostic settings of the Public IP.') -param pidDiagnosticSettings diagnosticSettingType +param publicIpDiagnosticSettings diagnosticSettingType @description('Optional. The diagnostic settings of the Network Interface.') param nicDiagnosticSettings diagnosticSettingType @@ -370,7 +370,7 @@ module vm_nic 'modules/nested_networkInterface.bicep' = [for (nicConfiguration, ipConfigurations: nicConfiguration.ipConfigurations lock: lock nicDiagnosticSettings: nicDiagnosticSettings - pidDiagnosticSettings: pidDiagnosticSettings + publicIpDiagnosticSettings: publicIpDiagnosticSettings roleAssignments: contains(nicConfiguration, 'roleAssignments') ? (!empty(nicConfiguration.roleAssignments) ? nicConfiguration.roleAssignments : []) : [] } }] diff --git a/modules/compute/virtual-machine/modules/nested_networkInterface.bicep b/modules/compute/virtual-machine/modules/nested_networkInterface.bicep index bf80d2c13b..0a58fac23e 100644 --- a/modules/compute/virtual-machine/modules/nested_networkInterface.bicep +++ b/modules/compute/virtual-machine/modules/nested_networkInterface.bicep @@ -13,7 +13,7 @@ param ipConfigurations array param lock lockType @description('Optional. The diagnostic settings of the Public IP.') -param pidDiagnosticSettings diagnosticSettingType +param publicIpDiagnosticSettings diagnosticSettingType @description('Optional. The diagnostic settings of the Network Interface.') param nicDiagnosticSettings diagnosticSettingType @@ -27,7 +27,7 @@ module networkInterface_publicIPAddresses '../../../network/public-ip-address/ma name: '${deployment().name}-publicIP-${index}' params: { name: '${virtualMachineName}${ipConfiguration.pipconfiguration.publicIpNameSuffix}' - diagnosticSettings: pidDiagnosticSettings + diagnosticSettings: publicIpDiagnosticSettings location: location lock: lock publicIPAddressVersion: contains(ipConfiguration, 'publicIPAddressVersion') ? ipConfiguration.publicIPAddressVersion : 'IPv4'