"What's the best way to prevent accidental deletion of an important resource in Azure?"

Muhammad Ansif 0 Reputation points
2025-01-24T18:59:02.14+00:00

I'm working with Azure and need to prevent the accidental deletion of critical resources like virtual machines, databases, and storage accounts. I need a method that ensures these resources are protected from unintentional deletions by users or automated processes, without compromising operational flexibility. Ideally, the solution should be easy to implement and enforce across multiple resources within a subscription or resource group.

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,985 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Andreas Baumgarten 116.6K Reputation points MVP
    2025-01-24T20:24:27.86+00:00

    Hi @Muhammad Ansif ,

    to prevent the deletion of Azure resources "by accident" you can set locks to a related resource:

    Please tacke a look here for more details: Lock your resources to protect your infrastructure


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.