Azure / azure-policy

Repository for Azure Resource Policy built-in definitions and samples
MIT License
1.5k stars 1.09k forks source link

NetworkSecurityGroup_FlowLog_Deploy.json - errors in Az Gov - resourceNotfound #1275

Open wayneme75 opened 8 months ago

wayneme75 commented 8 months ago

Details of the scenario you tried and the problem that is occurring

when deploying this policy it accurately evaluates the resources which do not have flow logs, upon deployment this fails with the error, resourceNotFound.

Verbose logs showing the problem

Suggested solution to the issue

Noticed that the API version used for the Microsoft.Resources/deployments was 2019 and "Microsoft.Network/networkWatchers/flowLogs" was 2019. Both API were updated to 2022-09-01 and 203-04-01 respectively. Policy worked  

If policy is Guest Configuration - details about target node