How to remove the expired Azure Policy Exemption. Do we need to remove from Portal or Github first?

Madhusudhana Rao Dasari 0 Reputation points
2024-08-14T14:14:04.35+00:00

How to remove the expired Azure Policy Exemption. Do we need to remove from Portal or Github first?
Which is best practice?

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
911 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2024-08-14T14:14:04.3866667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To remove an expired Azure Policy Exemption, you can delete the exemption resource from the Azure portal. You do not need to remove it from GitHub. Deleting the exemption resource will remove the exemption from the policy evaluation. It is a best practice to regularly revisit your exemptions to ensure that all eligible items are appropriately exempted and promptly remove any no longer qualifying for exemption. At that time, exemption resources that have expired could be deleted as well.


    References:

    0 comments No comments

  2. brtrach-MSFT 16,506 Reputation points Microsoft Employee
    2024-08-15T02:28:25.7733333+00:00

    @Madhusudhana Rao Dasari I understand you have some questions regarding Azure Policy. I would be happy to assist you. If you find the below content helpful, please consider accepting it as an answer. If you have further questions, please reply here and I would be happy to assist you further.

    You can use either the Azure Portal or GitHub, depending on how your policies are managed. Here are the steps for both methods:

    Azure Portal

    1. Navigate to Azure Policy: Go to the Azure Portal and search for “Azure Policy.”
    2. Select Exemptions: In the Azure Policy dashboard, select “Exemptions” under the “Authoring” section.
    3. Find the Expired Exemption: Locate the expired exemption you want to remove.
    4. Delete the Exemption: Click on the exemption and select “Delete.”

    GitHub

    If your Azure policies are managed as code in a GitHub repository:

    1. Locate the Exemption File: Find the JSON file that defines the policy exemption in your repository.
    2. Remove or Update the File: Delete the file or update it to remove the exemption.
    3. Commit and Push Changes: Commit your changes and push them to the repository.

    Best Practices

    The best practice depends on your organization’s workflow:

    • Azure Portal: Ideal for quick, manual changes.
    • GitHub: Preferred for organizations using Infrastructure as Code (IaC) practices, ensuring changes are tracked and version controlled.
    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.