Azure / Azure/bicep

policyDefinitions() function

Open
#20,182 2 comments 9 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
Like built-in roles we also have built-in policy definitions. So there is similar problem like https://github.com/Azure/bicep/issues/1895 but for role definitions. The situation with custom policy definitions is a little bit better as the resource name does not have to be GUID but still policy definitions resource naming restrictions does not makes it easy to understand what policy definition what it does. Policy definitions names must be 1-64 characters long on subscription and resource group scope and management group scope it is worse - 1-24 characters. Now I know that unlike role definitions policy definitions change their display names way more often but I think this is something that can be reduced. After all all built-in ones are created by Microsoft employees and shouldn't be hard to set some rules to change names only in certain rare situations - like may be in Preview phase of the policy definition or product/service name change.

**Describe the solution you'd like**
policyDefinitions() function. The function probably will have scope parameter as well as unlike role definitions you can have the same policy definition resource name but at different scope.

Contributor guide

Open the contributing guide

Research direction

The issue proposes a policyDefinitions() function for built-in and custom policy definitions. Start by comparing this request with the linked role-definitions issue and reviewing how policy definition names and scopes work in Azure. Done means the function supports the required scope behavior and makes policy definitions easier to reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.