Giter VIP home page Giter VIP logo

Comments (6)

AzureStackNerd avatar AzureStackNerd commented on September 7, 2024 1
{
  "$schema": "https://raw.githubusercontent.com/Azure/enterprise-azure-policy-as-code/main/Schemas/policy-exemption-schema.json",
  "exemptions": [
    // DOES NOT WORK Is trying to create 2 exemptions because there are 2 policy Assignments with different effects
    {
      "name": "3bc74b9b-91d5-4b47-bc66-574321e4322f",
      "displayName": "logging-oms-workspace",
      "description": "logging-oms-workspace description",
      "exemptionCategory": "Mitigated",
      "scope": "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/rg-test-resources-d",
      "expiresOn": null,
      "policySetDefinitionName": "diaglogs-la-initiative",
      "policyDefinitionReferenceIds": [
        "LALAAGENTWINDOWS"
      ]
    },
    // WORKS
    {
      "name": "62c963c1-00f4-4555-92c3-1dfc9d7207fc",
      "displayName": "security-center-pricing-policy via policyset",
      "description": "security-center-pricings via policyset description",
      "exemptionCategory": "Mitigated",
      "scope": "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/rg-test-resources-d",
      "expiresOn": null,
      "policySetDefinitionName": "mg-asc-settings-initiative",
      "policyDefinitionReferenceIds": [
        "ascstorage"
      ]
    }
  ]
}

from enterprise-azure-policy-as-code.

anwather avatar anwather commented on September 7, 2024

If you make the exemption names unique it works?

from enterprise-azure-policy-as-code.

AzureStackNerd avatar AzureStackNerd commented on September 7, 2024

This is what I think is happening:
There is 1 exemption (with a unique name) in the JSON-file, referred by policySetDefinitionName and policyDefinitionReferenceId. EPAC figures out which policyAssignmentId it should take for creating the exemption, but cannot. Since there are 2 assignments, it cannot create 2 exemptions based on 1 unique exemption name.

How can I create a unique exemption name in this scenario?

from enterprise-azure-policy-as-code.

anwather avatar anwather commented on September 7, 2024

from enterprise-azure-policy-as-code.

anwather avatar anwather commented on September 7, 2024

I wonder if you will have to use this method to assign the exemption - as it is getting confused because it doesn't know which assignment to look up?

from enterprise-azure-policy-as-code.

AzureStackNerd avatar AzureStackNerd commented on September 7, 2024

Yeah. I was afraid you might say that. I will look into that way. We migrating our old management group structure to the enterprise scale one. We probably have to calculate the new policyAssignmentIds then.

from enterprise-azure-policy-as-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.