Rajesh Swarnkar, thank you for posting this question.
In addition to the replies shared above, please find the following information that should help you in this regards:
- To understand the exact reason of non-compliance, you can click on the "Details" option in the "Resource Compliance" section for the specific non-compliance policy. This will open a blade with the evaluation causing the failure in compliance -
- For your other question to understand a way to fix the policy definition, for absent "
existenceCondition"
would actually depend on the end goal. For example, should it be present or not? An easy way to understand the expected state of a resource for which the policy is defined is to export its ARM template from portal and review the fields and values available. For details see - Use Azure portal to export a template. Based on its state, you may choose to apply the correct existence condition. The VS Code extension for Azure Policy comes in very handy during the development/debugging phase as you would be able to evaluate the policy locally before assigning it.
Hope this helps.
If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.