last sync: 2021-Sep-22 19:36:51 UTC

Azure Policy definition

Azure Monitor solution 'Security and Audit' must be deployed

Name Azure Monitor solution 'Security and Audit' must be deployed
Azure Portal
Id 3e596b57-105f-48a6-be97-03e9243bad6e
Version 1.0.0
details on versioning
Category Monitoring
Microsoft docs
Description This policy ensures that Security and Audit is deployed.
Mode All
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: AuditIfNotExists
Allowed: (AuditIfNotExists, Disabled)
Used RBAC Role none
History none
Used in Initiatives none
JSON
{
  "displayName": "Azure Monitor solution 'Security and Audit' must be deployed",
  "policyType": "BuiltIn",
  "mode": "All",
  "description": "This policy ensures that Security and Audit is deployed.",
  "metadata": {
    "version": "1.0.0",
    "category": "Monitoring"
  },
  "parameters": {
    "effect": {
      "type": "String",
      "metadata": {
        "displayName": "Effect",
        "description": "Enable or disable the execution of the policy"
      },
      "allowedValues": [
        "AuditIfNotExists",
        "Disabled"
      ],
      "defaultValue": "AuditIfNotExists"
    }
  },
  "policyRule": {
    "if": {
      "field": "type",
      "equals": "Microsoft.Resources/subscriptions"
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "type": "Microsoft.OperationsManagement/solutions",
        "existenceCondition": {
          "allOf": [
            {
              "field": "Microsoft.OperationsManagement/solutions/provisioningState",
              "equals": "Succeeded"
            },
            {
              "field": "name",
              "like": "Security(*)"
            }
          ]
        }
      }
    }
  }
}