[PowerShell][Hubs] Remove-FinOpsHub fails when there's only one resource #554
Labels
Good first issue 🏆
Good for newcomers
Tool: FinOps hubs
Data pipeline solution
Tool: PowerShell
PowerShell scripts and automation
Type: Bug 🐛
Something isn't working
Milestone
🐛 Problem
Remove-FinOpsHub fails when there's only one resource:
👣 Repro steps
Remove-FinOpsHub
command🤔 Expected
Should return true when successful.
ℹ️ Additional context
Error is on line 101 of Remove-FinOpsHub.ps1:
The fix is to force the
$resources | Remove-AzResource
into an array. We should also be able to simplify and remove theReduce()
method.🙋♀️ Ask for the community
We could use your help:
The text was updated successfully, but these errors were encountered: