Forum Discussion

adampra86's avatar
adampra86
Copper Contributor
Sep 01, 2022

process for Azure subscription retirement

Hi all,

 

I'm wondering what processes/workflows you have in place for retiring (deleting) no more needed subscriptions.

I was thinking about stuff like this:

  • Financial reporting cleanup
  • RBAC cleanup
  • Firewall rule cleanup
  • Removal of AAD groups

What else could there be ? Could anyone share their view or even provide some useful documentations?

 

Thanks !

 

2 Replies

  • You can also run this query on Azure resource graph explorer to get a list of resources before you delete them or go to Resource Explorer and see the resources via GUI

    Query
    //Gets a list of Resources in your Subscription
    Resources
    | join kind=leftouter (ResourceContainers | where type=='microsoft.resources/subscriptions' | project SubName=name, subscriptionId) on subscriptionId
    | project type, name, SubName

    besides this
    -Remove RBAC
    -Delete Tags
    -Remove any locks
    -check Billing information
  • VNET Peering
    Access package if you are using PIM
    If you have any custom roles that reference this subscription in AssignableScopes, you should update those custom roles to remove the subscription. If you try to update a custom role after you cancel a subscription, you might get an error. For more information, see Troubleshoot problems with custom roles and Azure custom roles.
    https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/cancel-azure-subscription

Resources