azure-policy icon indicating copy to clipboard operation
azure-policy copied to clipboard

Enable logging by category group for microsoft.network/networkmanagers/ipampools to Log Analytics - "code": "ResourceNotFound"

Open feliasson opened this issue 11 months ago • 0 comments

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

I encountered an issue with the built-in Azure Policy initiative (Enable allLogs category group resource logging for supported resources to Log Analytics) that deploys diagnostic settings for resources of type microsoft.network/networkmanagers/ipampools.

The policy definition in your repository: https://github.com/Azure/azure-policy/blob/master/built-in-policies/policyDefinitions/Monitoring/DS_LA_network-networkmanagers-ipampools_DINE.json

Despite the policy being applied correctly, deployments are failing with the below provided error.

  • The exact IPAM pool resource ID(s) exists and is within the policy assigned scope
  • All other resource types within the policy initiative are successfully deploying diagnostic settings from the same policy assignment
  • The IPAM pools shows up as "Resources to Remediate"
    • The remediation task however only triggers through manually clicking Remediate in the portal
      • Once triggered, the deployment fails with the below error.

Verbose logs showing the problem

{
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
  "details": [
    {
      "code": "ResourceNotFound",
      "message": "The resource '/subscriptions/<redacted>/resourcegroups/<redacted>/providers/microsoft.network/networkmanagers/<redacted>/ipampools/<redacted>' doesn't exist."
    }
  ]
}

feliasson avatar Jan 08 '25 11:01 feliasson