{
  "id": "policy/azure-policy-resource-tagging-enforcement",
  "signature": "Resource was disallowed by policy. Policy: 'Require a tag on resources'",
  "signature_zh": "资源被策略禁止。策略：'要求资源带有标签'",
  "regex": "Resource was disallowed by policy.*Require a tag on resources",
  "domain": "policy",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Azure Policy denies resource creation or update if required tags (e.g., 'Environment', 'CostCenter') are missing, but the deployment template or CLI command omitted the tags.",
  "root_cause_type": "generic",
  "root_cause_zh": "Azure Policy 在缺少必需标签（如 'Environment'、'CostCenter'）时拒绝资源创建或更新，但部署模板或 CLI 命令未包含标签。",
  "versions": [
    {
      "version": "Azure Policy v1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure CLI 2.40+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Azure Policy deny effect blocks the resource creation entirely; the resource never exists to be updated.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Requires Contributor permissions at the management group level, which most developers lack, and violates compliance requirements.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Include the required tags in the ARM template or Bicep file under the 'tags' property.",
      "success_rate": 0.9,
      "how": "Include the required tags in the ARM template or Bicep file under the 'tags' property.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use Azure CLI with --tags parameter when creating resources.",
      "success_rate": 0.85,
      "how": "Use Azure CLI with --tags parameter when creating resources.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 ARM 模板或 Bicep 文件的 'tags' 属性中包含必需标签。",
    "使用 Azure CLI 创建资源时添加 --tags 参数。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects",
  "official_doc_section": null,
  "error_code": "Conflict",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-11-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}