Add more granular settings for policy export

Open
#939 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
azure, powershell
Domain
cloud, devops

Research direction

Start by tracing the policy export flow and the settings.json handling for Core.SkipResourceType. Compare the two proposed approaches and verify that exemptions, assignments, definitions, and policy set definitions can be filtered independently; done means the selected configuration produces the intended exported resources.

Written by the indexing model from the issue text.

Description

Describe the solution you'd like

I would like to get the possibility to do granular filtering on what policy resources to export. Today we only have the option to configure SkipPolicy: true/false which includes exemptions, assignments, definitions and policysetdefinitions. I have a case where the customer only wants to export some of these and there is no way to filter out just a few of them. Adding for example Microsoft.Authorization/policyExemptions to Core.SkipResourceType will not work.

Suggested solutions:

  1. Change the logic of policy export to honor any resource types specified in Core.SkipResourceType.
  2. Add additional properties to settings.json. E.g. Core.SkipPolicyType.
"Core.SkipPolicyType": [
     "policyexemptions",
     "policyassignments"
],
Dominant language
PowerShell
Stars
420
Forks
174
Avg merge
16d 18h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/AzOps

All issues in Azure/AzOps

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.