An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
Azure policy - how to apply a policy on specific resources
Hello,
I would like to test the new CIS Security Benchmarks for Windows Server by deploying the policy but only on a few resources. (arc onboarded machines)
How is this possible ?
In the Basics of the policy assignment, you can choose the scope but you can only select a susbcription and a resource group, you can not select specific resources.
On the contrary, in the Exclusions, you can go down from subscription to specific resources.
So what I try is selecting my resource group and in the exclusion selecting on all the resources from the resource group except my few test machines.
Unfortunately this doesn't work; when selecting Review+Create I get an error message 'The request contant could not be read. Internal Error : request body too large'
I am sure it come from the fact that I have 16836 resources in the exclusions.
Here is a screenshot :
But even if it was working i would be the right way to do it because if a new resource was added to the resource group it would automatically get the policy as it wouldn't have been added to the exclusions.
So what is the best way to achieve this ?
Thanks for your help
Marc