Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove-FinOpsHub PowerShell Command Does Not Accept/Respect "Yes to All" #1187

Open
AErmie opened this issue Dec 4, 2024 · 0 comments
Open
Assignees
Labels
Tool: FinOps hubs Data pipeline solution Tool: PowerShell PowerShell scripts and automation Type: Bug 🐛 Something isn't working

Comments

@AErmie
Copy link

AErmie commented Dec 4, 2024

🐛 Problem

When running the Remove-FinOpsHub PowerShell command, you are prompted with the following:

PS C:\Users\adine> Remove-FinOpsHub -Name "finops-hub-forge"

Confirm
Are you sure you want to perform this action?
Performing the operation "DeleteFinOpsHub" on target "finops-hub-forge".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A

However, even if you enter "A" for "Yes to all", it ignores this, and prompts for confirmation for every single resource.

👣 Repro steps

  1. Install required PowerShell modules
  2. Deploy a FinOps Hub resource
  3. Run Remove-FinOpsHub -Name "HUB_NAME" and enter A on the initial prompt

🤔 Expected

The expectation is that we will not be prompted for every single resource deletion, if we've indicated "Yes to All"

📷 Screenshots

Image

Note

Ignore the error about not being able to delete the NSG because it's in use. Although, ideally the Remove-FinOpsHub command should identify this, and de-associate it, so that it can be deleted as part of Hub removal.

ℹ️ Additional context

Installed PowerShell Modules

PS C:\Users\adine> Get-Module -ListAvailable Az.Accounts

    Directory: C:\Users\adine\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     4.0.0                 Az.Accounts                         Core,Desk {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave…}

PS C:\Users\adine> Get-Module -ListAvailable Az.Resources

    Directory: C:\Users\adine\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     7.7.0                 Az.Resources                        Core,Desk {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}

PS C:\Users\adine> Get-Module -ListAvailable FinOpsToolkit

    Directory: C:\Users\adine\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     0.6                   FinOpsToolkit                       Desk      {Add-FinOpsHubScope, Add-FinOpsServicePrincipal, Deploy-FinOpsHub, Get-FinOpsCostExport…}

🙋‍♀️ Ask for the community

We could use your help:

  1. Please vote this issue up (👍) to prioritize it.
  2. Leave comments to help us solidify the vision.
@AErmie AErmie added Needs: Triage 🔍 Untriaged issue needs to be reviewed Type: Bug 🐛 Something isn't working labels Dec 4, 2024
@arthurclares arthurclares self-assigned this Dec 5, 2024
@flanakin flanakin added Tool: PowerShell PowerShell scripts and automation Tool: FinOps hubs Data pipeline solution labels Dec 10, 2024
@flanakin flanakin added this to the 2024-12 - December milestone Dec 10, 2024
@flanakin flanakin removed the Needs: Triage 🔍 Untriaged issue needs to be reviewed label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tool: FinOps hubs Data pipeline solution Tool: PowerShell PowerShell scripts and automation Type: Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants