func (ar *AzureReader) ListVirtualNetworks(ctx context.Context) ([]network.VirtualNetwork, error) {
	client := network.NewVirtualNetworksClient(ar.config.SubscriptionID)
	client.Authorizer = ar.authorizer
	output, err := client.List(ctx, ar.GetResourceGroupName())
	if err != nil {
		return nil, errors.Wrap(err, "unable to list network.VirtualNetwork from Azure APIs")
	}
	resources := make([]network.VirtualNetwork, 0)
	for output.NotDone() {
		for _, res := range output.Values() {
			resources = append(resources, res)
		}
		if err := output.NextWithContext(ctx); err != nil {
			break
		}
	}
	return resources, nil
}
ListVirtualNetworks returns a list of VirtualNetworks within a subscription and a resource group
package azurerm
import (
	"context"
	"github.com/pkg/errors"
	"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute"
	"github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry"
	"github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic"
	"github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2020-01-01/mariadb"
	"github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2020-01-01/mysql"
	"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network"
	"github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2020-01-01/postgresql"
	"github.com/Azure/azure-sdk-for-go/services/preview/desktopvirtualization/mgmt/2019-12-10-preview/desktopvirtualization"
	"github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql"
	"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage"
)
func (ar *AzureReader) ListVirtualMachines(ctx context.Context) ([]compute.VirtualMachine, error) {
	client := compute.NewVirtualMachinesClient(ar.config.SubscriptionID)
	client.Authorizer = ar.authorizer
	output, err := client.List(ctx, ar.GetResourceGroupName())
	if err != nil {
		return nil, errors.Wrap(err, "unable to list compute.VirtualMachine from Azure APIs")
	}
	resources := make([]compute.VirtualMachine, 0)
	for output.NotDone() {
		for _, res := range output.Values() {
			resources = append(resources, res)
		}
		if err := output.NextWithContext(ctx); err != nil {
			break
		}
	}
	return resources, nil
}
func (ar *AzureReader) ListVirtualMachineScaleSets(ctx context.Context) ([]compute.VirtualMachineScaleSet, error) {
	client := compute.NewVirtualMachineScaleSetsClient(ar.config.SubscriptionID)
	client.Authorizer = ar.authorizer
	output, err := client.List(ctx, ar.GetResourceGroupName())
	if err != nil {
		return nil, errors.Wrap(err, "unable to list compute.VirtualMachineScaleSet from Azure APIs")
	}
	resources := make([]compute.VirtualMachineScaleSet, 0)
	for output.NotDone() {
		for _, res := range output.Values() {
			resources = append(resources, res)
		}
		if err := output.NextWithContext(ctx); err != nil {
			break
		}
	}
	return resources, nil
}
func (ar *AzureReader) ListVirtualMachineExtensions(ctx context.Context, VMName string, expand string) ([]compute.VirtualMachineExtension, error) {
	client := compute.NewVirtualMachineExtensionsClient(ar.config.SubscriptionID)
	client.Authorizer = ar.authorizer
	output, err := client.List(ctx, ar.GetResourceGroupName(), VMName, expand)
	if err != nil {
		return nil, errors.Wrap(err, "unable to list compute.VirtualMachineExtension from Azure APIs")
	}
	return *output.Value, nil
}
func (ar *AzureReader) ListAvailabilitySets(ctx context.Context) ([]compute.AvailabilitySet, error) {
	client := compute.NewAvailabilitySetsClient(ar.config.SubscriptionID)
	client.Authorizer = ar.authorizer
	output, err := client.List(ctx, ar.GetResourceGroupName())
	if err != nil {
		return nil, errors.Wrap(err, "unable to list compute.AvailabilitySet from Azure APIs")
	}
	resources := make([]compute.AvailabilitySet, 0)
	for output.NotDone() {
		for _, res := range output.Values() {
			resources = append(resources, res)
		}
		if err := output.NextWithContext(ctx); err != nil {
			break
		}
	}
	return resources, nil
}
func (ar *AzureReader) ListImages(ctx context.Context) ([]compute.Image, error) {
	client := compute.NewImagesClient(ar.config.SubscriptionID)
	client.Authorizer = ar.authorizer
	output, err := client.List(ctx)
	if err != nil {
		return nil, errors.Wrap(err, "unable to list compute.Image from Azure APIs")
	}
	resources := make([]compute.Image, 0)
	for output.NotDone() {
		for _, res := range output.Values() {
			resources = append(resources, res)
		}
		if err := output.NextWithContext(ctx); err != nil {
			break
		}
	}
	return resources, nil
}