Share via

Creating a custom Policy Using Azure Resource Selector

Seeman, David 20 Reputation points
2024-10-08T20:26:44.4233333+00:00

Is it possible to create a custom policy or utilize Azure policies to implement a deny resource type policy by using only the resource selector parameters, rather than specifying the actual parameters within the policy without the use of initatives?

Also, is it possible to augment the limit for resource selector and parameter count within a policy (EX: 12 resource selectors and 60 parameters for each).

Azure Policy
Azure Policy

An Azure service that is used to implement corporate governance and standards at scale for Azure resources.


Answer accepted by question author

Deepanshu katara 18,150 Reputation points MVP Volunteer Moderator
2024-10-09T06:00:17.85+00:00

Hello David, Welcome to MS Q&A

Yes, it is possible to create a custom policy in Azure that implements a deny resource type policy using resource selectors. Resource selectors allow you to specify which resources should be evaluated for compliance based on certain criteria, such as resource location or type. This means you can define a policy that denies specific resource types while leveraging resource selectors to narrow down the scope of evaluation.

However, the actual parameters for the deny action must still be specified within the policy definition itself. Resource selectors can help target specific resources but do not replace the need for defining the parameters of the policy.

For more detailed information, you can refer to the following Microsoft documentation:

Kindly accept answer if it helps

Please let us know if any further questions

Thanks

Deepanshu

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.