File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121 "github.com/Azure/go-autorest/autorest/to"
2222 infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
2323 "sigs.k8s.io/cluster-api-provider-azure/azure"
24+ azureutil "sigs.k8s.io/cluster-api-provider-azure/util/azure"
2425)
2526
2627// SDKToVMSS converts an Azure SDK VirtualMachineScaleSet to the AzureMachinePool type.
@@ -63,8 +64,15 @@ func SDKToVMSS(sdkvmss compute.VirtualMachineScaleSet, sdkinstances []compute.Vi
6364
6465// SDKToVMSSVM converts an Azure SDK VirtualMachineScaleSetVM into an infrav1exp.VMSSVM.
6566func SDKToVMSSVM (sdkInstance compute.VirtualMachineScaleSetVM ) * azure.VMSSVM {
67+ // Convert resourceGroup Name ID ( ProviderID in capz objects )
68+ var convertedID string
69+ convertedID , err := azureutil .ConvertResourceGroupNameToLower (to .String (sdkInstance .ID ))
70+ if err != nil {
71+ convertedID = to .String (sdkInstance .ID )
72+ }
73+
6674 instance := azure.VMSSVM {
67- ID : to . String ( sdkInstance . ID ) ,
75+ ID : convertedID ,
6876 InstanceID : to .String (sdkInstance .InstanceID ),
6977 }
7078
You can’t perform that action at this time.
0 commit comments