Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

globalNotScrops not working #774

Closed
thyme51 opened this issue Oct 15, 2024 · 1 comment
Closed

globalNotScrops not working #774

thyme51 opened this issue Oct 15, 2024 · 1 comment

Comments

@thyme51
Copy link

thyme51 commented Oct 15, 2024

We started out with

  "deploymentRootScope": "/providers/Microsoft.Management/managementGroups/MyCompany"

Then a new subscription was added for a truck load of arc enabled servers, which should have no policies right now at all. In order mo remove 100s of non-compliant resources, we took the short-cut: (instead of exempting each policy/policy set) for that subscription

Therefore we added "/subscriptions/sub-arc-p/*"

        "globalNotScopes": [
            "/subscriptions/*/resourceGroups/cloud-shell-storage*",
            "/subscriptions/sub-arc-p/*"
        ]

But this has no effect at all. I can add exemptions manually for that subscription scope for eacy policy which works fine.

What am I missing ?

Thanks
Jørgen

@anwather
Copy link
Collaborator

To exclude the subscription you should list it as /subscriptions/<<subscriptionId>>. Don't need to put the asterisk at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants