Skip to content

Commit

Permalink
Add description of storage account ID for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Kyrris committed Oct 26, 2016
1 parent 13c9b7a commit 324e879
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin/providers/azurerm/resource_arm_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,8 @@ func findStorageAccountResourceGroup(meta interface{}, storageAccountName string
return "", fmt.Errorf("Wrong number of results making resource request for query %s: %s", filter, len(results))
}

// Storage Account ID is in the form
// /subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RESOURCE_GROUP]/providers/Microsoft.Storage/storageAccounts/[STORAGE_ACCOUNT]
idSplit := strings.Split(strings.TrimPrefix(*results[0].ID, "/"), "/")
storageAccountResourceGroupName := idSplit[3]
return storageAccountResourceGroupName, nil
Expand Down

0 comments on commit 324e879

Please sign in to comment.