Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 2.15 KB

howto-cleanup-after-image-published.md

File metadata and controls

33 lines (22 loc) · 2.15 KB

How to clean up the storage account with VHD files after image is published

Normally, the image build CICD (ihs CICD, twas-base CICD and twas-nd CICD) workflow will provision the source VM, install software package, execute integration test and finally generate SAS urls for OS disk and data disk VHD files which will be used for creating/updating Azure virtual machine offer(s) in Azure Partner Center.

These VHD files are stored in a storage account in Azure, and you should get it deleted to reduce Azure cost after image is successfully published and available in the Partner Center.

Find out the storage account from Azure Portal

Follow steps below to find out where the storage account is from Azure Portal.

  1. Go to Actions.
  2. Find out the workflow you kicked off before. Click to open.
  3. Copy URL from browser address bar, which looks like https://github.com/WASdev/azure.websphere-traditional.image/actions/runs/<run-id>. Copy <run-id>.
  4. Go to Azure Portal > Type "Resource groups" in the search bar > Select "Resource groups" from the list of service.
  5. In the page of "Resource groups", paste copied <run-id> into the filter box. Wait a few seconds and click the resource group listed in the page. Log down the resource group name.
  6. In the page of selected resource group, you should be able to see the storage account resource.

Clean up

Now you can delete the resource group of the storage account, which will delete all resources inside the resource group.

  1. In the page of selected resource group, click "Delete resource group".
  2. Type the resource group name and click "Delete".
  3. The deletion operation is handled asychronously, the UI will notify you once it completes.

Alternatively, you can also execute the following command to delete the resource group:

az group delete --name <resource-group-of-storage-account> --yes