last sync: 2021-Mar-03 15:53:01 UTC

Azure Policy definition

Azure Monitor Logs for Application Insights should be linked to a Log Analytics workspace

Name Azure Monitor Logs for Application Insights should be linked to a Log Analytics workspace
Azure Portal
Id d550e854-df1a-4de9-bf44-cd894b39a95e
Version 1.0.0
details on versioning
Category Monitoring
Microsoft docs
Description Link the Application Insights component to a Log Analytics workspace for logs encryption. Customer-managed keys are commonly required to meet regulatory compliance and for more control over the access to your data in Azure Monitor. Linking your component to a Log Analytics workspace that's enabled with a customer-managed key, ensures that your Application Insights logs meet this compliance requirement, see https://docs.microsoft.com/azure/azure-monitor/platform/customer-managed-keys.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: audit
Allowed: (audit, deny, disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-02-17 14:28:42 add d550e854-df1a-4de9-bf44-cd894b39a95e
Used in Initiatives none
Json
{
  "properties": {
    "displayName": "Azure Monitor Logs for Application Insights should be linked to a Log Analytics workspace",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Link the Application Insights component to a Log Analytics workspace for logs encryption. Customer-managed keys are commonly required to meet regulatory compliance and for more control over the access to your data in Azure Monitor. Linking your component to a Log Analytics workspace that's enabled with a customer-managed key, ensures that your Application Insights logs meet this compliance requirement, see https://docs.microsoft.com/azure/azure-monitor/platform/customer-managed-keys.",
    "metadata": {
      "version": "1.0.0",
      "category": "Monitoring"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "The effect determines what happens when the policy rule is evaluated to match"
        },
        "allowedValues": [
          "audit",
          "deny",
          "disabled"
        ],
        "defaultValue": "audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Insights/components"
          },
          {
            "anyOf": [
              {
                "field": "Microsoft.Insights/components/WorkspaceResourceId",
                "equals": ""
              },
              {
                "field": "Microsoft.Insights/components/WorkspaceResourceId",
                "exists": "false"
              }
            ]
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/d550e854-df1a-4de9-bf44-cd894b39a95e",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "d550e854-df1a-4de9-bf44-cd894b39a95e"
}