Skip to content

fix(powershell): bump Az.Accounts/Az.Resources floor in hub module manifest - #2260

Open
Michael Flanakin (flanakin) wants to merge 3 commits into
flanakin/v15-prepfrom
flanakin/945-hub-module-az-floor
Open

fix(powershell): bump Az.Accounts/Az.Resources floor in hub module manifest#2260
Michael Flanakin (flanakin) wants to merge 3 commits into
flanakin/v15-prepfrom
flanakin/945-hub-module-az-floor

Conversation

@flanakin

Copy link
Copy Markdown
Collaborator

Summary

Fixes #945. The generated FinOpsToolkit PowerShell module manifest (built by .build/BuildHelper/Build-PsModule.ps1) declares a RequiredModules floor of Az.Accounts 2.17.0 / Az.Resources 6.5.1. This is what New-FinOpsCostExport, Deploy-FinOpsHub, and the other FinOps toolkit deployment cmdlets depend on — and it's well behind what's actually installed/tested today, which is the source of the stale Az PowerShell version warning reported in #945.

This PR raises the floor to Az.Accounts 5.4.0 / Az.Resources 9.1.0 — the exact versions installed and genuinely testable in this environment (not a speculative bump to some newer, untested version).

Scope note: per prior discussion on this issue (see #2250, which was rejected as off-target), this change touches only the FinOps hub PowerShell deployment surface. It does not touch CI workflow pins or the Optimization Engine.

Cmdlets validated (touch Az.Accounts/Az.Resources)

  • Private/Invoke-Rest.ps1Get-AzAccessToken, Get-AzContext
  • Private/Save-FinOpsHubTemplate.ps1Get-AzContext
  • Public/Add-FinOpsHubScope.ps1Get-AzResource
  • Public/Add-FinOpsServicePrincipal.ps1Get-AzContext
  • Public/Deploy-FinOpsHub.ps1Get-AzResourceGroup, New-AzResourceGroup, New-AzResourceGroupDeployment
  • Public/Get-FinOpsCostExport.ps1Get-AzContext
  • Public/Get-FinOpsHub.ps1Get-AzContext, Get-AzResource
  • Public/New-FinOpsCostExport.ps1Get-AzContext, Get-AzResourceProvider
  • Public/Register-FinOpsHubProviders.ps1Get-AzResourceProvider
  • Public/Remove-FinOpsCostExport.ps1Get-AzContext
  • Public/Remove-FinOpsHub.ps1Get-AzContext, Get-AzResource, Remove-AzResource
  • Public/Remove-FinOpsHubScope.ps1Get-AzResource
  • Public/Start-FinOpsCostExport.ps1Get-AzContext

Validation (differential, before/after)

Ran the full Unit + Lint Pester suite (./src/scripts/Test-PowerShell.ps1 -Unit -Lint) against Az.Accounts 5.4.0 / Az.Resources 9.1.0 (the actually-installed versions), once on unmodified HEAD (baseline) and once with this change applied.

Passed Failed Skipped
Baseline (before) 5597 2 119
After (this change) 5597 2 119

The 2 failures are identical in both runs (Should checkout the PR branch, Should use changed-files action in Action.UpdateMsLearnDates.Tests.ps1) — pre-existing, unrelated to Az.Accounts/Az.Resources, and out of scope for this fix.

Also confirmed the module builds cleanly against the new floor (Build-PsModule generates a manifest with the updated RequiredModules).

Integration tests were not run — they require live Azure authentication (Connect-AzAccount) that isn't available in this environment, so they're out of scope for this validation pass.

Test plan

  • Baseline Unit+Lint run on unmodified branch: 5597 passed / 2 failed / 119 skipped
  • Post-change Unit+Lint run: 5597 passed / 2 failed / 119 skipped (identical, zero regressions)
  • Module builds and generates manifest with updated RequiredModules
  • Integration tests (out of scope here — requires live Azure credentials)

🤖 Generated with Claude Code

Co-authored-by: MSBrett <MSBrett@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
GitHub Actions should be referenced using a commit SHA (“pinned”) rather than a mutable tag
…nifest

Deployment cmdlets (Deploy-FinOpsHub, New-FinOpsCostExport, etc.) declare
a RequiredModules floor of Az.Accounts 2.17.0 / Az.Resources 6.5.1 in the
generated FinOpsToolkit module manifest, well behind what's actually
installed and tested in CI/dev, triggering a stale-version warning at
import time. Raise the floor to Az.Accounts 5.4.0 / Az.Resources 9.1.0 --
the exact versions validated here via a full Unit+Lint Pester run
(baseline vs. post-change), with zero regressions.

Fixes #945

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 01:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed Skill: DevOps GitHub setup and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants