FinOpsVMMetrics.psd1

@{
    RootModule        = 'FinOpsVMMetrics.psm1'
    ModuleVersion     = '0.1.7'
    GUID              = 'a557d45a-3cba-4998-a4b1-ef32536ae958'
    Author            = 'FinCops / AIforFinOpsNavigator'
    CompanyName       = 'Well Architected'
    Copyright         = '(c) Well Architected. All rights reserved.'
    Description       = 'Reads Azure VM utilisation from Azure Monitor platform metrics (no guest agent) and exports VMPerformance-compatible monthly rows (CPU percentiles + memory) for FinOps rightsizing.'

    PowerShellVersion = '7.2'

    # NB: Az modules are intentionally NOT declared as RequiredModules. Pinning Az submodule
    # versions makes Install-Module pull newer Az packages that conflict with the Az already
    # loaded in Azure Cloud Shell, so the module fails to import there. The functions only
    # *call* Az cmdlets (Get-AzVM, Get-AzMetric, Get-AzComputeResourceSku, Set-AzStorageBlobContent),
    # which auto-load on demand from whatever Az is present. Required: Az.Accounts, Az.Monitor,
    # Az.Compute, Az.Storage (all present in Cloud Shell).

    FunctionsToExport = @(
        'Invoke-VMMetricsCollection',
        'Get-AzVMUtilization',
        'Export-VMPerformanceData',
        'Publish-VMPerformanceData'
    )
    CmdletsToExport   = @()
    VariablesToExport = @()
    AliasesToExport   = @()

    PrivateData = @{
        PSData = @{
            Tags         = @('Azure', 'FinOps', 'Rightsizing', 'Metrics', 'AzureMonitor', 'VM')
            ProjectUri   = 'https://github.com/wellarchitectedch/AIforFinOpsNavigator'
            ReleaseNotes = 'v0.1.7: -ResourceIdFile list mode -- drive collection from a curated VM resource-id list (e.g. cost-data KQL select-vms-from-cost.kql, which scopes by billed run-hours + cost); subscriptions derived from the IDs. v0.1.6: exclude managed/ephemeral compute (VMSS, Spot, Databricks/AKS RGs, tag/name/age rules) via cheap Resource Graph signals before pulling metrics; report excluded-by-reason. v0.1.5: parallel collection (-ThrottleLimit, default 12) + single multi-metric call per chunk = much faster on large fleets; live progress. v0.1.4: add resourceId (lowercased, unique key) + skuName columns so multi-subscription output is unambiguous. v0.1.3: progress bar (per subscription + per VM). v0.1.2: drop hard Az RequiredModules pins (fixes import failure in Azure Cloud Shell). v0.1.1: multi-subscription sweep into one CSV; SAS-token upload for cross-tenant Cloud Shell. v0.1.0: initial platform-metric collection.'
        }
    }
}