Thank you for your post!
I understand that you provisioned a Managed HSM and based on the information you provided, it seems that you soft deleted the HSM but didn't purge the HSM resource. Please note that, if you've already deleted the HSM, it'll be in a soft-deleted state and will continue to accrue hourly charges until it is purged. For more info.
To purge / permanently delete your HSM, you can use the following PowerShell command:
Remove-AzKeyVaultManagedHsm -Name 'myhsm' -Location "eastus" -Force -PassThru True
For more info - Purge a deleted managed HSM
-
If you are unable to purge your HSM using the above command, it's possible that you enabled purge protection when creating the Managed HSM and will have to wait until the retention period has expired.
If you'd like to work with the Managed HSM team so they can look into the possibility of purging your Managed HSM before the purge protection period, please let me know. I'd be happy to enable your Subscription ID for a one-time free technical support request so you can get this issue resolved.
Additional Links:
- Clean up Managed HSM resources
- Managed HSM soft-delete and purge protection
- Manage keys and managed HSMs
- Remove-AzKeyVaultManagedHsm PowerShell Examples
I hope this helps!
If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.
If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.