microsoft / vscode-azurestaticwebapps

Azure Static Web Apps extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps
MIT License
92 stars 35 forks source link

Deleting Static Web App from within VS Code leaves behind Azure Resource Groups #594

Closed Reshmi-Sriram closed 2 years ago

Reshmi-Sriram commented 2 years ago

Transferring the issue from Static Web Apps #676 by @SheldonHage

Deleting Static Web App from within VS Code leaves behind Azure Resource Groups

To Reproduce

  1. Use VS Code to checkin code to Github with action to deploy to new Azure Static Web App
  2. After successful build and deployment...
  3. Go to Azure Portal and see that a dedicated resource group was created for the static web app
  4. In VS Code, use the Static Web App plugin to delete the Static Web App
  5. Go back to Azure portal and see that the dedicated resource group remains.

Expected behavior I think this should be handled differently. Basically what I saw after a number of trial and error failed deployments and deleting the static web apps from within VS Code, my Azure portal had many resource groups with auto-incremented names. In practice these would leave a person unsure which was still in use and which weren't

nturinski commented 2 years ago

We can do a check similar to this https://github.com/microsoft/vscode-azurevirtualmachines/blob/main/src/commands/deleteVirtualMachine/deleteAllResources.ts#L37-L48