Skip to content

feat: add storage quota visibility (Get-StorageQuota.ps1) - #25

Merged
Haflidi Fridthjofsson (haflidif) merged 1 commit into
mainfrom
feat/storage-quota
Jun 30, 2026
Merged

feat: add storage quota visibility (Get-StorageQuota.ps1)#25
Haflidi Fridthjofsson (haflidif) merged 1 commit into
mainfrom
feat/storage-quota

Conversation

@haflidif

Copy link
Copy Markdown
Collaborator

Summary

Implements #14 — Storage quota coverage following the design posted on the issue.

Adds read-only scripts/Get-StorageQuota.ps1:

  • Storage-account count quota per subscription + region (the data behind az storage account show-usage, default limit 250) → StorageAccounts rows with Used / Limit / Available / PctUsed and an OK / NearLimit / AtLimit flag.
  • Optional managed-disk capacity inventory (-IncludeDiskCapacityInventory) → total provisioned GiB by region and disk SKU, summed from Resource Graph.

Honesty rules baked in

  • Managed-disk capacity rows are inventory, not quota: Azure exposes no general per-subscription managed-disk capacity quota usage API, so those rows carry IsQuota=False, blank Limit/Available/PctUsed and Flag=Informational — never a compliance signal.
  • Quota ≠ guaranteed capacity reminder.

Parameters

-Location (default norwayeast), -AllLocations, -SubscriptionIds, -SubscriptionCsv, -NearLimitPct (default 80), -IncludeDiskCapacityInventory, -OutPath.

Validation

  • AST-clean and Windows PowerShell 5.1-safe (parser + forbidden-syntax scan).
  • E2E validated under PowerShell 5.1 against a live tenant: StorageAccounts quota returns correctly (e.g. 12/250, OK); the disk-inventory path against a subscription with disks returns provisioned-GiB rows grouped by SKU (Standard_LRS, Premium_LRS, StandardSSD_LRS, StandardSSD_ZRS), all correctly flagged IsQuota=False / Informational with blank limit.
  • No tenant identifiers or resource names included in the repo or output schema.

Docs

README services matrix + Learn link (storage account limits), docs/commands.md scenario row, docs/concepts.md new "Storage quota" section, docs/getting-started.md + AGENTS.md access tables, CHANGELOG.md [Unreleased].

Resolves #14.

Read-only collector for the per-subscription, per-region storage-account
count quota (the data behind az storage account show-usage, default 250)
with used/limit/available/PctUsed and OK/NearLimit/AtLimit flags.
Optionally (-IncludeDiskCapacityInventory) adds an informational
managed-disk capacity inventory - total provisioned GiB by region and
disk SKU from Resource Graph - explicitly flagged IsQuota=False/
Informational with a blank limit, because Azure exposes no general
per-subscription managed-disk capacity quota usage API. Supports
-Location, -AllLocations and the standard subscription selectors.
Reader-only.

Resolves #14.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Storage quota coverage (storage-account count per region, managed-disk capacity)

1 participant