diff --git a/pkg/azure/azure.go b/pkg/azure/azure.go index 36a163224..5de7130ca 100644 --- a/pkg/azure/azure.go +++ b/pkg/azure/azure.go @@ -41,7 +41,7 @@ func ConvertToClusterResourceGroup(subscriptionID SubscriptionID, resourceGroup } split := strings.Split(string(resourceGroup), "_") - if len(split) != 4 || split[0] != "MC" { + if len(split) != 4 || strings.ToUpper(split[0]) != "MC" { logLine := fmt.Sprintf("infrastructure resource group name: %s is expected to be of format MC_ResourceGroup_ResourceName_Location", string(resourceGroup)) return "", errors.New(logLine) } diff --git a/pkg/azure/azure_test.go b/pkg/azure/azure_test.go index 0ae0c5b1e..12259f1e1 100644 --- a/pkg/azure/azure_test.go +++ b/pkg/azure/azure_test.go @@ -45,6 +45,10 @@ var _ = Describe("Azure", func() { subID := SubscriptionID("xxxx") resGp := ResourceGroup("MC_resgp_resName_location") Expect(ConvertToClusterResourceGroup(subID, resGp, nil)).To(Equal("/subscriptions/xxxx/resourcegroups/resgp/providers/Microsoft.ContainerService/managedClusters/resName")) + + subID = SubscriptionID("xxxx") + resGp = ResourceGroup("mc_resgp_resName_location") + Expect(ConvertToClusterResourceGroup(subID, resGp, nil)).To(Equal("/subscriptions/xxxx/resourcegroups/resgp/providers/Microsoft.ContainerService/managedClusters/resName")) }) }) })