You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[PowerShell] Deploy-FinOpsHub resets unspecified options on redeploy #2399
As a FinOps hub admin, I need Deploy-FinOpsHub to keep my existing hub's options on redeploy in order to upgrade without silently resetting settings I didn't re-specify.
⚠️ Problem
Deploy-FinOpsHub only passes the four retention values when you specify them (#2206, #2348). Every other option is always sent, so an unspecified option resets to the command's default on an existing hub: StorageSku (Premium_LRS), EnableManagedExports, EnableInfrastructureEncryption, EnablePurgeProtection (switches become false), VirtualNetworkAddressPrefix, ScopesToMonitor (empty), network mode (public), and tags. Recommendation options (enableRecommendations, enableAHBRecommendations, enableSpotRecommendations) can't be set from the command at all.
💎 Solution
Only send an option when the user specifies it, as retention already does, so the template keeps the current value; add the missing recommendation parameters. Where the template can't "keep current", read the existing hub and fill in the value.
📋 Tasks
Pass options only when bound, for each option above
Add recommendation parameters to Deploy-FinOpsHub
Unit tests: redeploy without options does not change existing values
Docs and changelog
✅ Acceptance
Redeploying an existing hub with only -Name, -ResourceGroupName, and -Location leaves every option unchanged.
ℹ️ Additional context
Complements the parameter-file command in the portal upgrade issue. Raised in PR #2394 review.
Activity