Skip to content

Commit 7315fc5

Browse files
authored
fix listsubresource empty error (#96)
1 parent 0a23cc6 commit 7315fc5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AzureBasicLoadBalancerUpgrade'
1313

1414
# Version number of this module.
15-
ModuleVersion = '2.3.3'
15+
ModuleVersion = '2.3.4'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -107,7 +107,7 @@
107107
# IconUri = ''
108108

109109
# ReleaseNotes of this module
110-
ReleaseNotes = 'Fixed issue with creating a reference object of the VMSS, resulting inconsistent NAT Pool membership'
110+
ReleaseNotes = 'Fix spurious error when calling _HardCopyObject when an IPConfig has no pool membership'
111111

112112
# Prerelease string of this module
113113
# Prerelease = ''

AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/BackendPoolMigration/BackendPoolMigration.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ function _MigrateNetworkInterfaceConfigurationsVmss {
116116
}
117117
}
118118
# Taking a hard copy of the object and assigning, it's important because the object was passed by reference
119-
$ipConfiguration.LoadBalancerBackendAddressPools = _HardCopyObject -listSubResource $genericListSubResource
119+
If ($genericListSubResource.Count -gt 0) {
120+
$ipConfiguration.LoadBalancerBackendAddressPools = _HardCopyObject -listSubResource $genericListSubResource
121+
}
120122
$genericListSubResource.Clear()
121123
}
122124
}

0 commit comments

Comments
 (0)