From 163d682574bea13da63c61436fb29655be8cfc8d Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 12 Jul 2019 16:48:32 +0100 Subject: [PATCH] r/virtual_machine: removing the unused `findStorageAccountResourceGroup` func --- azurerm/resource_arm_virtual_machine.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/azurerm/resource_arm_virtual_machine.go b/azurerm/resource_arm_virtual_machine.go index eff093bc0f4b..0db2cee0b388 100644 --- a/azurerm/resource_arm_virtual_machine.go +++ b/azurerm/resource_arm_virtual_machine.go @@ -1764,31 +1764,6 @@ func expandAzureRmVirtualMachineOsDisk(d *schema.ResourceData) (*compute.OSDisk, return osDisk, nil } -func findStorageAccountResourceGroup(meta interface{}, storageAccountName string) (string, error) { - client := meta.(*ArmClient).resourcesClient - ctx := meta.(*ArmClient).StopContext - filter := fmt.Sprintf("name eq '%s' and resourceType eq 'Microsoft.Storage/storageAccounts'", storageAccountName) - expand := "" - var pager *int32 - - rf, err := client.List(ctx, filter, expand, pager) - if err != nil { - return "", fmt.Errorf("Error making resource request for query %s: %+v", filter, err) - } - - results := rf.Values() - if len(results) != 1 { - return "", fmt.Errorf("Wrong number of results making resource request for query %s: %d", filter, len(results)) - } - - id, err := parseAzureResourceID(*results[0].ID) - if err != nil { - return "", err - } - - return id.ResourceGroup, nil -} - func resourceArmVirtualMachineStorageOsProfileHash(v interface{}) int { var buf bytes.Buffer