Azure / Azure/bicep

Support Policy Definition Schema

Open
#6,957 0 comments 0 reactions 0 assignees View on GitHub
enhancement provider bug provider improvement types: swagger inaccuracy
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.**
Currently the `policyRule` property on `microsoft.authorization/policydefinitions` is typed as `any`, however it requires a very specific object schema. It would be nice if the type definition could be a bit stronger

**Describe the solution you'd like**
There does seem to be a schema defined for hte policy rule object:
https://github.com/Azure/azure-resource-manager-schemas/blob/main/schemas/2020-09-01/policyDefinition.json

I imagine it should be possible to work that into the openapi definition
https://github.com/Azure/azure-resource-manager-schemas/blob/fa29c2c8ad02412f5ed437d7664a7cfe9bf67c72/schemas/2021-06-01/Microsoft.Authorization.Resources.json#L508-L512

Contributor guide

Open the contributing guide

Research direction

Start by comparing the policy rule schema in schemas/2020-09-01/policyDefinition.json with the policyRule definition in schemas/2021-06-01/Microsoft.Authorization.Resources.json at lines 508-512. Trace how that OpenAPI definition becomes the Bicep type for microsoft.authorization/policydefinitions. Done means policyRule is represented by the specific schema rather than any.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.